以下成员源于类 QAction are part of the Qt compatibility layer. We advise against using them in new code.
| QAction (QObject * parent , const char * name ) | |
| QAction (const QString & text , const QKeySequence & shortcut , QObject * parent , const char * name ) | |
| QAction (const QIcon & icon , const QString & text , const QKeySequence & shortcut , QObject * parent , const char * name ) | |
| QKeySequence | accel () const |
| bool | addTo (QWidget * w ) |
| QIcon | iconSet () const |
| bool | isOn () const |
| bool | isToggleAction () const |
| QString | menuText () const |
| bool | removeFrom (QWidget * w ) |
| void | setAccel (const QKeySequence & shortcut ) |
| void | setIconSet (const QIcon & i ) |
| void | setMenuText (const QString & text ) |
| void | setToggleAction (bool b ) |
| void | setOn (bool b ) |
| void | activated (int i = 0) |
Use one of the QAction constructors that doesn't take a name argument and call setObjectName () 代替。
Use one of the QAction constructors that doesn't take a name argument and call setObjectName () 代替。
Use one of the QAction constructors that doesn't take a name argument and call setObjectName () 代替。
使用 shortcut () 代替。
另请参阅 setAccel ().
[signal]
void
QAction::
activated
(
int
i
= 0)
使用 triggered () 代替。
使用 QWidget::addAction () 代替。
例如,若有代码像
action->addTo(widget);
可以把它重写成
widget->addAction(action);
使用 icon () 代替。
另请参阅 setIconSet ().
使用 isChecked () 代替。
使用 isCheckable () 代替。
使用 text () 代替。
另请参阅 setMenuText ().
使用 QWidget::removeAction () 代替。
例如,若有代码像
action->removeFrom(widget);
可以把它重写成
widget->removeAction(action);
使用 setShortcut () 代替。
另请参阅 accel ().
使用 setIcon () 代替。
另请参阅 iconSet ().
使用 setText () 代替。
另请参阅 menuText ().
[slot]
void
QAction::
setOn
(
bool
b
)
使用 setChecked () 代替。
另请参阅 isOn ().
使用 setCheckable () 代替。
另请参阅 isToggleAction ().