[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] Can you use a QTimer in a non-gui thread?
From: Solly Brown <sollyb () cse ! unsw ! edu ! au>
Date: 2004-10-30 7:37:19
Message-ID: Pine.LNX.4.61.0410301735500.447 () williams ! orchestra ! cse ! unsw ! EDU ! AU
[Download RAW message or body]
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: sollyb@cse.unsw.edu.au
p: (02) 9385 7779
m: School of Computer Science and Engineering
University of New South Wales
NSW 2052
Australia
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic