DelayButton QML Type

  • Import Statement: import QtQuick.Extras 1.4

  • Since: Qt 5.5

  • Inherits: Button

  • Group: DelayButton is part of extras, extras-interactive

Detailed Description

A DelayButton

The DelayButton is a checkable button that incorporates a delay before the button becomes checked and the activated signal is emitted. This delay prevents accidental presses.

The current progress is expressed as a decimal value between 0.0 and 1.0. The time it takes for activated to be emitted is measured in milliseconds, and can be set with the delay property.

The progress is indicated by a progress indicator around the button. When the indicator reaches completion, it flashes.

A DelayButton being held down

A DelayButton being held down

A DelayButton after being activated

A DelayButton after being activated

You can create a custom appearance for a DelayButton by assigning a DelayButtonStyle.

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.

delay : int

This property holds the time it takes (in milliseconds) for progress to reach 1.0 and emit activated.

The default value is 3000 ms.

exclusiveGroup : ExclusiveGroup

This property holds the ExclusiveGroup that the button belongs to.

The default value is null.

[read-only] hovered : 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.

This property requires QApplication.

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-only] pressed : bool