[Interest] Strange problem where exec() of dialogs returns immediately

Nikos Chantziaras realnc at gmail.com
Sat Mar 10 19:15:33 CET 2012


On 10/03/12 17:59, Thiago Macieira wrote:
> Please provide us a compileable testcase.

I was able to reproduce this with a minimal application.  I'm attaching 
it.  It just consists of minimal QApplication and QMainWindow 
subclasses.  The latter overrides closeEvent() in order to pop-up a 
confirmation dialog that will demonstrate the problem.  The former has a 
main() member function that is invoked from the real main() function of 
the program using MetaObject::invokeMethod().

To reproduce the bug, run it from the terminal, and then try to close 
the window.  You will notice that msgBox.exec() returns immediately.

(Btw, this is on Gentoo Linux AMD64, using Qt 4.8.0.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EventLoopBug.tar.bz2
Type: application/x-bzip
Size: 1237 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120310/b3313f0a/attachment.bin>


More information about the Interest mailing list