View Single Post
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#625
Originally Posted by noobmonkey View Post
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.

Last edited by Venemo; 2010-06-11 at 09:05.
 

The Following User Says Thank You to Venemo For This Useful Post: