Shouldn't you send event to qApp->focusWidget() ?
Or you may also use QAbstractButton::click ()
Shouldn't you send event to qApp->focusWidget() ?
Or you may also use QAbstractButton::click ()
Thanks for your response.
I relatively new to QT, I am not able to comprehend your reply.
can you give me more details/ example of simple implementation.
Ratheendran
should beQApplication::sendEvent(this->focusWidget(), &mouseEvent);
QApplication::sendEvent(qApp->focusWidget(), &mouseEvent);
and the place where you are calling this code from, you can instead use button->click(); where button is the pointer to the button you want to simulate the click for.
Thanks again,
I tried "QApplication::sendEvent(qApp->focusWidget(), &mouseEvent);" in my code this is not working.
My application required signal to be send to the button on which cursor is active.
so can you suggest any other alternative.
Thanks,
Ratheendran
Bookmarks