I Am Not Using QPixmap, In PyQt. But I Get QPixmap: It Is Not Safe To Use Pixmaps Outside The GUI Thread In PyQt
I am using PyQt for a project. But not all of a sudden I am getting an error: QPixmap: It is not safe to use pixmaps outside the GUI thread in PyQt I am not using QPixmap anywhe
Solution 1:
It looks like you are using threads, and somehow you are trying to change the GUI from some thread other than the main GUI thread (this is not allowed). This could be happening somewhat indirectly--for example your server thread calls a function on MyForm, which tries to update the itemCheckBtn. Even though the code is part of MyForm, it is still being executed from the server thread. Instead, you need to use some thread-safe mechanism to inform the GUI thread that a change has occurred, and let it do the GUI work. (see http://doc.qt.nokia.com/4.6/threads-qobject.html)
Post a Comment for "I Am Not Using QPixmap, In PyQt. But I Get QPixmap: It Is Not Safe To Use Pixmaps Outside The GUI Thread In PyQt"