diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-22 11:14:59 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-22 11:41:54 +0200 |
commit | e548d825aef388178147f27539b17cc8dc0d5e9a (patch) | |
tree | 4441bac46010b5c2fd71a8e9e5e12887c19e1bbc | |
parent | d82382fe2befd9d80f0b030d3aac985195104c23 (diff) |
Windows: fix error in Button.qml when hovering
Fixes: QTBUG-92824
Pick-to: 6.1 6.2
Change-Id: I261b269187b0106939837620287838222f8923b4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/quickcontrols2/windows/Button.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quickcontrols2/windows/Button.qml b/src/quickcontrols2/windows/Button.qml index 5480d7f7..1b73e1de 100644 --- a/src/quickcontrols2/windows/Button.qml +++ b/src/quickcontrols2/windows/Button.qml @@ -66,6 +66,7 @@ T.Button { } NativeStyle.Button { + id: hoverButton control: control x: background.x y: background.y @@ -74,7 +75,8 @@ T.Button { useNinePatchImage: false overrideState: NativeStyle.StyleItem.AlwaysHovered opacity: control.hovered ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: parent.transitionDuration } } + visible: opacity !== 0 + Behavior on opacity { NumberAnimation { duration: hoverButton.transitionDuration } } } icon.width: 24 |