Can you create and use a QTimer in a non-gui thread?

The Trolltech documentation (at one point) seems to suggest that you shouldn't:

"Any operations that generate events must not be called by any thread other than the GUI thread. Examples of such operations are: creating a QWidget, QTimer,..."

Is that right?

I'm running a QTimer in my non-gui thread, which allows me to control the speed at which I'm processing my simulation data. Every timer click I do a bit more processing and then use a postEvent() to send the data across to the gui thread.

Am I wrong to do this? It seems to work fine on my machine, but I don't want it to break mysteriously in the future...!

Yours confusedly, Solly


-------------------------------------

Solly Brown

Robotics Group
Department of Artificial Intelligence
University of New South Wales / NICTA

e: [EMAIL PROTECTED]
p: (02) 9385 7779
m: School of Computer Science and Engineering
   University of New South Wales
   NSW 2052
   Australia

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to