[SOLVED] Is onExited: name2.state = "" valid? (State changes using onExited with hover enabled on mouse areas)
QML and Qt Quick
4
Posts
3
Posters
2.1k
Views
1
Watching
-
Hi guys,
Hopefully a quick one:
Say we have have an item with id of 'name2' and two states of 'default' and 'State1' Over that we apply:
@
MouseArea {
id: name
width: name2.width
height: name2.height
opacity: 0
hoverEnabled: true
onExited: name2.state = ""
}
@Alas this seems to have no effect. Have I made a syntax error? Or is there a better way to do this? I have affected image sources using onHover and Exit to good effect on menus and other items just fathoming how to use the same idea to effect states.
Thanks for your help.
If anyone wants to code model for using hover to change image for their menus let me know and will post.
[EDIT: code formatting, please wrap in @-tags, Volker]