event() is called automatically whenever any event occurs(like a key or mouse-button press,mouse move, etc.)... you don't have to call it... what the code does is that on the toolButton press, it activates the What's This? mode, then, it overrides the cursor so that the red circle is not shown...
the event() function checks to see if an event is a mouse-release event and the What's This? mode is active...if not, it simply passes it on to its parent for normal processing...otherwise, it restores the cursor to its normal form and then passes it on for normal processing...
P.S. - you should change this:
[quote author="raaghuu" date="1340706879"]
@
myClass::onToolButtonClcked(...) //...this is the SLOT for the helpButton clicked() SIGNAL
{
setOverrideCursor(Qt::WhatsThisCursor);
QWhatsThis::enterWhatsThisMode();
}
@
[/quote]
to this:
@
myClass::onToolButtonClcked(...) //...this is the SLOT for the helpButton clicked() SIGNAL
{
QWhatsThis::enterWhatsThisMode();
setOverrideCursor(Qt::WhatsThisCursor);
}
@