DelayButton QML Type

复选按钮,按住足够长的时间就会触发。更多

Import Statement: import QtQuick.Controls
Inherits:

AbstractButton

属性

信号

详细说明

DelayButton 是一个可选中的按钮,在按钮变为checked 和发出activated() 信号之前有一个延迟。这种延迟可防止意外按下。

当前进度用0.01.0 之间的十进制值表示。activated() 信号发出的时间以毫秒为单位,可通过delay 属性进行设置。

按钮上的进度指示器会显示进度。

另请参阅 自定义 DelayButton按钮控件

属性文档

delay : int

该属性用于保存progress 到达1.0 并发出activated() 所需的时间(毫秒)。

默认值为3000 ms。


progress : real

该属性保存进度指示器显示的当前进度,范围为0.0 -1.0


transition : Transition

该属性保存按下或释放按钮时应用于progress 属性的转换。


信号文档

activated()

progress 到达1.0 时会发出该信号。

注: 相应的处理程序是onActivated


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