Is there any other easy-fast way to connect a button and a on/off visualizatn method?
I have a lot of buttons to view/hide elements.
Each time I have to write the code I have to connect signal & slots. (I must to create a slot for a simple code... )
I'd like to write a simple :
Code:
connect (widget,SIGNAL(mouse_click)), other_widget->visible= !(other_widget->visible));
I could be possible?
Any trick....
Thanks
Re: Is there any other easy-fast way to connect a button and a on/off visualizatn met
If you have lots of this kind of extra slots, maybe you need a state machine? QStateMachine
Re: Is there any other easy-fast way to connect a button and a on/off visualizatn met
Write a simple class using QSignalMapper that will do it for you.