ToolButton
Provides a button type that is typically used within a ToolBar. More...
Inherits FocusScope
This type was introduced in QtQtuick.Controls 1.0.
Properties
- action : Action
- activeFocusOnPress : bool
- checkable : bool
- checked : bool
- exclusiveGroup : ExclusiveGroup
- hovered : bool
- iconName : string
- iconSource : url
- pressed : bool
- style : Component
- text : string
- tooltip : string
Signals
- clicked()
Detailed Description
ToolButton is functionally similar to Button, but can provide a look that is more suitable within a ToolBar.
ToolButton {
iconSource: "edit-cut.png"
}
Property Documentation
action : Action |
This property holds the associated button action.
If a button has an action associated, the action defines the button's properties like checked, text, tooltip etc.
When an action is set, it's still possible to override the text, tooltip, iconSource, and iconName properties.
The default value is null.
activeFocusOnPress : bool |
This property specifies whether the button should gain active focus when pressed.
The default value is false.
checkable : bool |
This property holds whether the button is checkable.
The default value is false.
checked : bool |
This property holds whether the button is checked.
Only checkable buttons can be checked.
The default value is false.
exclusiveGroup : ExclusiveGroup |
This property holds the ExclusiveGroup that the button belongs to.
The default value is null.
read-onlyhovered : bool |
This property indicates whether the control is being hovered.
iconName : string |
The image label source as theme name. When an icon from the platform icon theme is found, this takes precedence over iconSource.
iconSource : url |
This property holds the icon shown on the button. If the button has no icon, the iconSource property will be an empty string.
The default value is the empty string.
read-onlypressed : bool |
This property holds whether the button is being pressed.
style : Component |
The style Component for this control.
See also Qt Quick Controls Styles QML Types.
text : string |
This property holds the text shown on the button. If the button has no text, the text property will be an empty string.
The default value is the empty string.
tooltip : string |
This property holds the button tooltip.