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 () 代替。