diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-22 13:16:08 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2021-06-22 22:21:26 +0200 |
commit | d8a1aac5651f346aa1df1cd912e33c1a82d41e42 (patch) | |
tree | 426391945d730f7af6e5b00798300cd589443805 /src | |
parent | 2855f912b87698a970af3581311fbd8224f0464d (diff) |
Windows: fix error in CheckBox.qml when hovering
Pick-to: 6.1 6.2
Change-Id: I897327d5f3bfd0ebbdca2df74ea43d6625c67a65
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quickcontrols2/windows/CheckBox.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quickcontrols2/windows/CheckBox.qml b/src/quickcontrols2/windows/CheckBox.qml index 03778c4f..13fde0e6 100644 --- a/src/quickcontrols2/windows/CheckBox.qml +++ b/src/quickcontrols2/windows/CheckBox.qml @@ -66,6 +66,7 @@ T.CheckBox { } NativeStyle.CheckBox { + id: hoverCheckBox control: control x: indicator.x y: indicator.y @@ -75,7 +76,8 @@ T.CheckBox { 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: hoverCheckBox.transitionDuration } } } contentItem: CheckLabel { |