Compatibility Members for QAction
The following members of class QActionare part of the Qt compatibility layer. We advise against using them in new code.
Public Functions
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) |
- 8 public functions inherited from QObject
Public Slots
void | setOn(bool b) |
Signals
void | activated(int i = 0) |
Member Function Documentation
QAction::QAction(QObject * parent, const char * name)
Use one of the QAction constructors that doesn't take a name argument and call setObjectName() instead.
QAction::QAction(const QString & text, const QKeySequence & shortcut, QObject * parent, const char * name)
Use one of the QAction constructors that doesn't take a name argument and call setObjectName() instead.
QAction::QAction(const QIcon & icon, const QString & text, const QKeySequence & shortcut, QObject * parent, const char * name)
Use one of the QAction constructors that doesn't take a name argument and call setObjectName() instead.
QKeySequence QAction::accel() const
Use shortcut() instead.
See also setAccel().
[signal]
void QAction::activated(int i = 0)
Use triggered() instead.
bool QAction::addTo(QWidget * w)
Use QWidget::addAction() instead.
For example, if you have code like
action->addTo(widget);
you can rewrite it as
widget->addAction(action);
QIcon QAction::iconSet() const
Use icon() instead.
See also setIconSet().
bool QAction::isOn() const
Use isChecked() instead.
bool QAction::isToggleAction() const
Use isCheckable() instead.
QString QAction::menuText() const
Use text() instead.
See also setMenuText().
bool QAction::removeFrom(QWidget * w)
Use QWidget::removeAction() instead.
For example, if you have code like
action->removeFrom(widget);
you can rewrite it as
widget->removeAction(action);
void QAction::setAccel(const QKeySequence & shortcut)
Use setShortcut() instead.
See also accel().
void QAction::setIconSet(const QIcon & i)
Use setIcon() instead.
See also iconSet().
void QAction::setMenuText(const QString & text)
Use setText() instead.
See also menuText().
[slot]
void QAction::setOn(bool b)
Use setChecked() instead.
See also isOn().
void QAction::setToggleAction(bool b)
Use setCheckable() instead.
See also isToggleAction().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.