You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
estan@newton:~$ qmlscene test.qml
qml: test.py imported
WARNING: QApplication was not created in the main() thread.
and nothing shows up.
Running python3 test.py works fine of course.
Any idea why QApplication is giving a warning about not being created in the main thread? Both QApplications involved here (the one I spawn, and the one that drives the QML application) are created in completely different processes, so they should both be in the main thread of their respective processes, right?
(Some background, since I know this looks like a very contrived example: I'm working on the HMI GUI for an analysis machine. I communicate with the machine backend scripts using ZeroMQ sockets. When not running on the machine itself, I have a little simulator tool I built using Qt to simulate ZeroMQ messages from the machine. So for convenience while developing, I thought I'd just fire up the simulator process using multiprocessing from the Python side of my QML/pyotherside frontend, so that I get them both launched side by side.)
The text was updated successfully, but these errors were encountered:
I'm probably missing something obvious, but with the test case
test.py
test.qml
running
qmlscene test.qml
givesand nothing shows up.
Running
python3 test.py
works fine of course.Any idea why
QApplication
is giving a warning about not being created in the main thread? Both QApplications involved here (the one I spawn, and the one that drives the QML application) are created in completely different processes, so they should both be in the main thread of their respective processes, right?(Some background, since I know this looks like a very contrived example: I'm working on the HMI GUI for an analysis machine. I communicate with the machine backend scripts using ZeroMQ sockets. When not running on the machine itself, I have a little simulator tool I built using Qt to simulate ZeroMQ messages from the machine. So for convenience while developing, I thought I'd just fire up the simulator process using multiprocessing from the Python side of my QML/pyotherside frontend, so that I get them both launched side by side.)
The text was updated successfully, but these errors were encountered: