View Single Post
Posts: 13 | Thanked: 20 times | Joined on Jun 2010
#9
Yeah, a wiki page would be good.

Thanks for the input, everyone.

Avoid QThread

Threads cause a lot of problems and are difficult to use in many ways. Qt has a 'QTimer' mechanism that allows processing time to be shared so that events don't block the GUI.

This example seems to be pretty good and outline the different kinds of QTimers.

QTimers don't seem to work well with python-level blocking items, like putting a time.sleep(5) will pause everything. I'm not sure if there's a way to make this work or not.

PyQt Examples
There's the examples that come with the PyQt downloads that are written in Python and can be of use to figure out how to do something. It took me awhile to realize that the examples were also available in Python, which is handy to look at the source to figure out how to do something.