Compatibility Members for QActionGroup

以下成員源於類 QActionGroup are part of the Qt compatibility layer. We advise against using them in new code.

公共函數

void add (QAction * a )
void addSeparator ()
bool addTo (QWidget * widget )

信號

void selected (QAction * action )

成員函數文檔編製

void QActionGroup:: add ( QAction * a )

使用 addAction () 代替。

void QActionGroup:: addSeparator ()

Normally you add a separator to the menus or widgets to which actions are added, so this function is very rarely needed.

例如,若有代碼像

actionGroup->addSeparator();
					

可以把它重寫成

QAction *separator = new QAction(this);
separator->setSeparator(true);
actionGroup->addAction(separator);
					

bool QActionGroup:: addTo ( QWidget * widget )

例如,若有代碼像

actionGroup->addTo(widget);
					

可以把它重寫成

widget->addActions(actionGroup->actions());
					

[signal] void QActionGroup:: selected ( QAction * action )

使用 triggered () 代替。