Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.0
-
None
-
Tested on WinXP
-
05f3920562e7a718492bed61a48c0058b65a0d5d
Description
Sorry for the possibly unclear summary.
=== Steps to reproduce ===
1. Launch the following code in qmlviewer:
import QtQuick 1.0 Rectangle { width: 200 height: 200 Rectangle { id: rect width: 100 height: 30 anchors.centerIn: parent color: "red" Behavior on color { ColorAnimation {duration: 200}} MouseArea { id: mouseArea anchors.fill:parent hoverEnabled: true } states: State { name: "hover" when: mouseArea.containsMouse PropertyChanges {target: rect; color: "yellow"} } } }
2. Move the mouse quickly several times over the red rectangle. At some point, the rectangle will keep some orange color when the mouse is not hover it, instead of being fully reset to red
3. Expected result: the rectangle should be fully reset to it's default state when the hover state isn't acitvated. Ie: it should be red.
4. Workaround: use property bindings instead of state. Thus, if we define the rectangle color as:
color: mouseArea.containsMouse ? "yellow" : "red"
and remove the state, it will work as expected.
Attachments
Issue Links
- relates to
-
QTBUG-18384 QML States do not always revert to their original values if transition animations are interrupted.
- Closed