[PyKDE] Threading QApplications. Possible?

Trost Johnson jfj at freemail.gr
Tue Sep 21 04:52:01 BST 2004


Hi.

Suppose the minimal program:

def foo():
    app=QApplication(sys.argv)
    button=QPushButton("Hello World", None)
    app.setMainWidget(button)
    button.show()
    app.exec_loop()

And I say

 >>> thread.start_new_thread (foo, ())


Then the python console freezes....
Is it not possible o thread up multiple QApplications?
How is this achieved?


Thanks




More information about the PyQt mailing list