action QML Basic Type

The action type has all the properties of QAction.

The action type has all the properties of QAction. The properties are:

  • slot action.trigger - invoke the action
  • bool action.enabled - true if the action is enabled
  • string action.text - the text associated with the action

Actions are used like this:

Item {
    MouseArea { onClicked: myaction.trigger() }
    State { name: "enabled"; when: myaction.enabled == true }
    Text { text: someaction.text }
}

See also QML Basic Types.

© 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.