PDA

View Full Version : Crashing in a slot due to message box



hardgeus
25th November 2008, 17:58
In August I posted a problem with slots crashing if they took too long to return:

http://www.qtcentre.org/forum/f-qt-programming-2/t-bizarre-bug-with-a-slot-15547.html

I took Wysota's suggestion and posted an event for my expensive operation, and this worked around the problem.

But in other slots signaled by QHTTP RequestComplete, I am popping up a messagebox to the user letting them know that their download is complete. If they don't click this messagebox within about 30 seconds or so, the program crashes (the cause being identical to the aforementioned problem)

1) Am I not supposed to popup messageboxes in slots?

2) If it's OK to do this, are there certain types of slots where blocking behavior is unacceptable? Is the structure of my code just wrong? Should I be posting events any time I want to pop up a messagebox?

I am really confused here...

will49
26th November 2008, 19:38
http://www.qtcentre.org/forum/f-qt-programming-2/t-qapplication-breaks-when-qmessagebox-left-open-awhile-16323.html