Mouse area question
-
I have a sidebar menu with buttons that toggle, and on toggling to true they open their own little menus with buttons in them.
I wanted to just slap a mouse area on the main window so when leftclicked, it just untoggles all the buttons to close all the mini menus, but for some reason it's not working.
it works if I use onPressed, but obviously does not stay because as soon as it's not pressed it goes back. onClicked does not seem to work.
I was gonna replace it with an invisible button as I think that would be easire and maybe mouse area is just better suit for focus change, but I wanted to ask here first.
basically it's like this:
Button { toggle true blabla }
StateGroup { when button toggled make mini menu visible }
MouseArea { stretched to fit main window }
StateGroup { When mouse area is pressed, change Button to be toggled false }like I said pressed works, clicked does NOT
and if you are wondering why I am using state groups for each individual state it's because of visiblity scope issues.I was gonna make it cancel the toggle AND the state thinking the states were still activated> button reactivates on press?
Just need a chad to slide me some exper MouseArea info right now for the dirt
-
L Lahearle has marked this topic as solved on