本页内容

DelayButton QML Type

长按一定时间后触发复选框。更多...

Import Statement: import QtQuick.Controls
Inherits:

AbstractButton

属性

信号

详细说明

DelayButton 是一个可选中按钮,其设计在按钮变为checked 状态并发出activated() 信号之前会引入一段延迟。此延迟可防止误触。

当前进度以介于0.0 和1.0 之间的十进制值表示。activated()信号被触发所需的时间以毫秒为单位,可通过delay 属性进行设置。

进度通过按钮上的进度指示器显示。

另请参阅 《自定义 DelayButton和Button 控件》。

属性文档

delay : int

该属性存储progress 到达1.0 并触发activated()所需的时间(以毫秒为单位)。

默认值为3000 毫秒。

progress : real

该属性存储进度指示器所显示的当前进度,其取值范围为0.0 至1.0 。

transition : Transition

该属性保存了在按下或释放按钮时应用于progress 属性的过渡效果。

信号文档

activated()

当progress 达到1.0 时,会发出此信号。

注意: 相应的处理程序 是onActivated 。

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