Skip to content Skip to sidebar Skip to footer

Threading: Pyqt Crashes With "unknown Request In Queue While Dequeuing"

One part of an application I'm developing needs to send some emails to a small group of people. Since it may take a little while to connect to the SMTP server and send the emails,

Solution 1:

Wow, this was obscure.

The X11 windowing functions are apparently not threadsafe unless explicitly set to be so, and for whatever reason PyQt doesn't automatically set them to be. This can be corrected by adding the following before the QApplication constructor:

QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)

See the documentation on QApplicationAttributes.

Post a Comment for "Threading: Pyqt Crashes With "unknown Request In Queue While Dequeuing""