AbstractButton QML Type

Abstract base type providing functionality common to buttons. 更多...

导入语句: import QtQuick.Controls .
Since: Qt Quick Ultralite 1.0
继承:

Control

继承者:

Button , CheckBox , RadioButton ,和 Switch

特性

信号

方法

详细描述

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.

另请参阅 Controls Styling and 按钮控件 .

特性文档编制

autoRepeat : bool

This property holds whether the button repeats pressed() , released() and clicked() signals while the button is pressed and held down.

默认值为 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.

另请参阅 autoRepeat and autoRepeatInterval .


autoRepeatInterval : int

This property holds the interval of auto-repetition in milliseconds. The default value is 100 ms.

另请参阅 autoRepeat and autoRepeatDelay .


checkable : bool

This property holds whether the button is checkable.

A checkable button toggles between checked (on) and unchecked (off) when the user clicks on it.

设置 checked to true forces this property to true .

默认值为 false .

另请参阅 checked .


checked : bool

This property holds whether the button is checked.

另请参阅 checkable .


down : bool

This property holds whether the button is visually down.

Unless explicitly set, this property follows the value of pressed .

注意: Qt Quick difference: Restoring the original behavior by assigning undefined to down 不被支持。

另请参阅 pressed .


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.

另请参阅 down .


text : string

This property holds a textual description of the button.

注意: The text is used for accessibility purposes, so it makes sense to set a textual description even if the content item is an image.

另请参阅 contentItem .


信号文档编制

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.

注意: 相应处理程序是 onCanceled .


clicked ()

This signal is emitted when the button is interactively clicked by the user via touch or mouse.

注意: 相应处理程序是 onClicked .


pressed ()

This signal is emitted when the button is interactively pressed by the user via touch or mouse.

注意: 相应处理程序是 onPressed .


released ()

This signal is emitted when the button is interactively released by the user via touch or mouse.

注意: 相应处理程序是 onReleased .


toggled ()

This signal is emitted when a checkable button is interactively toggled by the user via touch or mouse.

注意: 相应处理程序是 onToggled .


方法文档编制

void toggle ()

Toggles the checked state of the button.