PDA

View Full Version : Mouse Freezes upon using QmessageBox::warning function.



kaushal_gaurav
18th June 2008, 05:18
There is a widget with gives a warning message on a particular condition.
We call parent widget as 'widget1' and warning widget as 'widget2'

Now the Problem : when the mouse is pressed on widget1 and widget2 pops up the UI hangs(The problem is only in windows OS). Note that the mouse was not released before the widget2 comes up. Now i can not click the OK button of warning box. it is freezed.
Mouse does not work now...i have to press 'ESC' or 'Space' from keyboard to close the dialog.

Please help me to slove this issue.

aamer4yu
18th June 2008, 05:21
On what signal of widget 1 are u showing widget 2 ?
if you are using pressed(), try using clicked() .

Also is widget 2 modal dialog ?

kaushal_gaurav
18th June 2008, 05:42
Signal on widget1 is clicked()
widget2 is modal.

Actually, there is a button on widget1 on whose click some scanning is done and at certain condition widget2(QMessageBox::warning()) is shown.

steps:
1. Press button on widget1.
2. Press mouse button on title bar of widget1 and keep it pressed until widget2 is not shown
3. When widget2 is shown ... GUI freezes... I can't click on widget2.

aamer4yu
18th June 2008, 05:48
try using a modeless dialog for widget2.
Obviously, ur mouse is not released when widget 2 is shown, and upon widget2 show, events wont be processed in widget 1 until widget 2 is closed ;)

kaushal_gaurav
18th June 2008, 05:50
but i also dont want events to be processed on widget1. I want the mouse to respond to widget 2