[PyQt] postEvent(), blocking processEvents() and QMessageBox.exec_
Carl Wolff
carl at wolff-online.nl
Fri May 27 16:18:50 BST 2016
Hello,
Already found the problem (I think)
msg.exec_() == PyQt4.QtGui.QMessageBox.Yes is blocking. As the whole thing
has just one single thread, there is no opportunity to post the event which
closes the dialog...
Best regards
Carl.
2016-05-27 16:38 GMT+02:00 Carl Wolff <carl at wolff-online.nl>:
> Hello,
>
> in my application I am posting (earlier recorded) events using the
> postEvents() call. After each postEvent() call I always call
> processEvents() to let the application process the event.
>
> When the logic of my app shows a modal dialog (as a result of the posted
> event) using the following snippet:
> msg = PyQt4.QtGui.QMessageBox(self)
>
> ...
>
> return msg.exec_() == PyQt4.QtGui.QMessageBox.Yes
>
> then the processEvents() call blocks.
>
> Can somebody give some hints here, what the cause is?
>
> Best regards
>
> Carl.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160527/4582dc00/attachment.html>
More information about the PyQt
mailing list