Thanks, very interesting!
However I’m afraid the problem is elsewhere (see http://qt-project.org/forums/viewthread/48610/) because I tried this:
import QtQuick 2.0
Rectangle {
id: root
width: 1024
height: 768
Component.onCompleted: {
root.state = "normal"
}
states: [
State {
name: "normal"
PropertyChanges { target: btn; color: "yellow" }
},
State {
name: "rollover"
PropertyChanges { target: btn; color: "red" }
}
]
Rectangle {
id: btn
width: 600
height: 300
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onEntered: root.state = "rollover"
onExited: root.state = "normal"
}
}
}
and the color changes after 1-2 seconds the mouse enters or exits the area. Trying to write the event on console leads to an immediate changes, to the issue is only for rendering.
↧