C
AbstractButton QML Type
Abstract base type providing functionality common to buttons. More...
Import Statement: | import QtQuick.Controls |
Since: | Qt Quick Ultralite 1.0 |
Inherits: | |
Inherited By: | Button, CheckBox, RadioButton, and Switch |
Properties
- autoRepeat : bool
- autoRepeatDelay : int
- autoRepeatInterval : int
- checkable : bool
- checked : bool
- down : bool
- indicator : Item
- pressed : bool
- text : string
Signals
Methods
- void toggle()
Detailed Description
AbstractButton provides the interface for controls with button-like behavior; for example, push buttons and checkable controls like radio buttons and check boxes. As an abstract control, it has no delegate implementations, leaving them to the types that derive from it.
See also Controls Styling and Button Controls.
Property Documentation
autoRepeat : bool |
This property holds whether the button repeats pressed(), released() and clicked() signals while the button is pressed and held down.
The default value is false
.
The initial delay and the repetition interval are defined in milliseconds by autoRepeatDelay and autoRepeatInterval.
autoRepeatDelay : int |
This property holds the initial delay of auto-repetition in milliseconds. The default value is 300
ms.
See also autoRepeat and autoRepeatInterval.
autoRepeatInterval : int |
This property holds the interval of auto-repetition in milliseconds. The default value is 100
ms.
See also autoRepeat and autoRepeatDelay.
checkable : bool |
down : bool |
indicator : Item |
This property holds the indicator item.
[read-only] pressed : bool |
This property holds whether the button is physically pressed. A button can be pressed by touch or mouse.
See also down.
text : string |
This property holds a textual description of the button.
Note: The text is used for accessibility purposes, so it makes sense to set a textual description even if the content item is an image.
See also contentItem.
Signal Documentation
canceled() |
This signal is emitted when the button loses mouse grab while being pressed, or when it would emit the released signal but the mouse cursor is outside the button's bounding rect.
Note: The corresponding handler is onCanceled
.
clicked() |
This signal is emitted when the button is interactively clicked by the user via touch or mouse.
Note: The corresponding handler is onClicked
.
pressed() |
This signal is emitted when the button is interactively pressed by the user via touch or mouse.
Note: The corresponding handler is onPressed
.
released() |
This signal is emitted when the button is interactively released by the user via touch or mouse.
Note: The corresponding handler is onReleased
.
toggled() |
This signal is emitted when a checkable button is interactively toggled by the user via touch or mouse.
Note: The corresponding handler is onToggled
.
Method Documentation
void toggle() |
Toggles the checked state of the button.
Available under certain Qt licenses.
Find out more.