PDA

View Full Version : Qtoolbutton-ignoring mouse events



rvenugopal
26th December 2006, 22:25
Hello everyone
I have a QToolbutton, which when pressed starts an algorithm. I call setEnabled(false) to disable this button receiving key and mouse events. When the processing is happening, if the user keeps clicking on the button, it queues it somewhere and starts immediately processing when i set the setEnabled to true. How do i go about fixing this?

Thanks
Raghavan

jacek
26th December 2006, 22:29
Try calling QCoreApplication::processEvents() before enabling that button.

rvenugopal
26th December 2006, 23:12
thank, man. it works.