PDA

View Full Version : keep in whatsThis mode



mjtooba
23rd February 2014, 14:23
Hi
i like to use whatsthis for touch application (windows + touch monitor) , bcz of small "?" button , i created a button and call "enterWhatsThisMode()" to enter help mode. but if user like to know about multiple item , it should press help button again and again.
how we can keep application in whatsthis mode by pressing a button , and exit wahtsthis mode by pressing again help button ?

anda_skoa
23rd February 2014, 14:35
From what you describe it seems that the help event triggers a reset of the what's this mode.

So what you could try is to have a state flag somewhere, that indicates whether you want to be in what's this mode, and use a global event filter to track what's this responses.
After each response you check the flag and reenter the what's this mode if necessary.

Cheers,
_

mjtooba
25th February 2014, 13:54
From what you describe it seems that the help event triggers a reset of the what's this mode.

So what you could try is to have a state flag somewhere, that indicates whether you want to be in what's this mode, and use a global event filter to track what's this responses.
After each response you check the flag and reenter the what's this mode if necessary.

Cheers,
_

Hi
I used a checkable button for this and instead of global event filter i derived virtual event fucntion in my application form.
i could enter "what's this mode" but can't toggle back my button to clear flag and get out of what's this mode.i can't use keyboard (touch screen) and only i can use click event.
one solution that may be inefficient , can you help me for better solution.
:create new button class and on new button event handler check if what's this actived on that , then transmit a unique signal to main app for quiting what's this mode.
result:
simply i created a 0.5 sec timer, check if in what'sthis mode and re-enter if not in mode. first click for is ok , but second object click not shown any what'sthis mode and mouse cursor icon changes to BLOCK sign !

anda_skoa
25th February 2014, 15:06
What do you mean with "but can't toggle back my button"?

Your QPushButton doesn't toggle back when you touch it again?

Cheers,
_