i) use [code] tags
ii) with Qt signals & slots and you do not really need to put that code into a separate thread
iii) if using QThread: put your code into a separate class (not the QThread subclass!) and create that in your thread's run() function. You should not add slots/signals to the QThread subclass itself. There are some postings that elaborate on that. Search for them, please.
(The QThread belongs to the thread that created it, not to the thread it is executing itself.)
HTH
Bookmarks