Defines a common action that can be shared amongst interactive items.
More...
Properties |
| bool | autoRepeat |
| | Whether the keyboard shortcut accepts auto-repeated events.
|
| bool | checkable |
| | Whether the menu item is checkable.
|
| bool | checked |
| | Whether the menu item is checked.
|
| bool | enabled |
| | Whether the action is enabled.
|
| ExclusiveGroup | exclusiveGroup |
| | The ExclusiveGroup to which the action belongs.
|
| string | iconName |
| | The name of the icon to be used.
|
| string | iconSource |
| | The source of the icon to be used.
|
|
variant | shortcut |
| | The keyboard shorcut used to trigger the action.
|
|
string | text |
| | The text to be displayed.
|
| bool | visible |
| | Whether the items using the action should be visible.
|
Detailed Description
Defines a common action that can be shared amongst interactive items.
import QtQuick 1.0
import org.hildon.components 1.0
Window {
id: window
title: qsTr("Actions Example")
action: action1
}
action: action2
}
}
id: group
}
id: action1
}
id: action2
onTriggered: console.log(qsTr("Action Two
triggered"))
}
MouseArea {
anchors.fill: parent
onClicked: menu.popup()
}
Column {
anchors.centerIn: parent
action: action1
}
action: action2
}
}
id: menu
action: action1
}
action: action2
}
}
}
- See Also
- AbstractButton, MenuItem
- Examples:
- actions.qml.
Member Function Documentation
| void Action::triggered |
( |
| ) |
|
|
signal |
Property Documentation
Whether the keyboard shortcut accepts auto-repeated events.
The default value is true.
Whether the menu item is checkable.
The default value is false.
Whether the menu item is checked.
The default value is false.
Whether the action is enabled.
The default value is true.
The name of the icon to be used.
- See Also
- iconSource
| string Action::iconSource |
|
readwrite |
The source of the icon to be used.
- See Also
- iconName
Whether the items using the action should be visible.
The default value is true.