Popup Qt Quick event handler issue
-
Hi guys, i use 2 popup like below code in qml. i want that when popup2 open, btn1 is not hovered and change it background to green. How can i do that? Thanks in advance for any help
Popup { id: popup1 width: 200 height: 300 modal: true focus: true contentItem: Rectangle { id: popup1Container Button { id: btn1 background: Rectangle { color: btn1.hovered ? "red" : green } onClicked: popup2.open() } } } Popup { id: popup2 width: 200 height: 300 modal: true focus: true contentItem: Rectangle { id: popup1Container Button { id: btn2 } } }