QActionEvent Class
The QActionEvent class provides an event that is sent when an action of a widget is added, removed or changed. More…
| Header | #include <QActionEvent> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Gui) |
| Module | Nt GUI C++ Classes |
| Inherits | QEvent |
List of all members, including inherited members
Public Functions
| QActionEvent(int type, QAction *action, QAction *before = nullptr) | |
| QAction * | action() const |
| QAction * | before() const |
Reimplemented Public Functions
| QActionEvent * | clone() const |
Detailed Description
A widget that shows its actions, such as a menu, handles it in QWidget::actionEvent().
See also QAction and QWidget::actionEvent().
Member Function Documentation
QActionEvent::QActionEvent(int type, QAction *action, QAction *before = nullptr)
Constructs the event of the given type, which is ActionAdded, ActionRemoved or ActionChanged, for the action. For ActionAdded, before is the action that the new one is in front of; nullptr if it is last.
QAction * QActionEvent::action() const
Returns the action that was added, removed or changed.
QAction * QActionEvent::before() const
Returns the action that the added action is in front of, or nullptr.
QActionEvent * QActionEvent::clone() const
Reimplements QEvent::clone().