diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-22 11:14:59 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-22 11:29:18 +0000 |
commit | a823571e47d536367423d3c3e0a90e4f885bcf46 (patch) | |
tree | 4132fdda0451e6eb39809b6d413b031aeab3f994 | |
parent | a80a4195e2419ae78ddca5997cf19fd595599204 (diff) |
Windows: fix error in Button.qml when hovering
Fixes: QTBUG-92824
Change-Id: I261b269187b0106939837620287838222f8923b4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e548d825aef388178147f27539b17cc8dc0d5e9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 |