Thread
:
[Annouce] HealthCheck - Hardware/System checker for the N900
View Single Post
Venemo
2010-06-11 , 09:02
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#
625
Originally Posted by
noobmonkey
But if anyone has useful tips for threading in pyqt, please let me know!
Well, of course we have!
The easiest way is using
QThreadPool
with a custom
QRunnable
implementation.
Your QRunnable's run() method would check the necessary values and refresh the UI.
The main UI window should have a
QTimer
and on a predefined
interval
(on the QTimer's
timeout
signal), it would create a new instance of your own QRunnable and make the thread pool execute it.
Note that the thread pool has a static "
global instance
", so you don't have to create an instance of it, just access the global instance and make that
do things for you
.
__________________
You should follow me on Twitter!
Apps:
Puzzle Master
,
IRC Chatter for Harmattan
,
IRC for Sailfish
Last edited by Venemo; 2010-06-11 at
09:05
.
Quote & Reply
|
The Following User Says Thank You to Venemo For This Useful Post:
noobmonkey
Venemo
View Public Profile
Send a private message to Venemo
Visit Venemo's homepage!
Find all posts by Venemo