Widgets must be created in the GUI thread
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Hi guys
I have a critical problem with PythonQt. So I hope somebody help me.
You know I have written a thread in python that gets python script and execute it. When I pass a simple script like below code to it for execution, it gives me this error “Widgets must be created in the GUI thread”.
from PythonQt import
Btn = QtGui.QpushButton(“ok”)
Btn.show()
I should mention that the script run in PythonQt engine nicely. After lots of attempting I try to write some independent GUI script like below code and it works nicely
from PythonQt import
bitArray = QtCore.QByteArray()
bitArray.append(20)
print(bitArray.at(0))
I don’t know how I can solve this problem! So I hope somebody give me some clue.
Last edit: Edvard 2018-08-22