Hello,
I am trying to use QThread with GUI application, so the GUI wont stall on me.
in th GUI, i have a window through witch i load a Txt file and parse it and do processing on it, they are in this manner
Qt Code:
loadFile (... ) { readFile(..); parseFile(..); prossValues(...); }To copy to clipboard, switch view to plain text mode
when i run the loadFile slot, it takes long time, and the GUI stalls.
what i did so far, is
I sub-classed the QThread,
override the run method and,
emit a signal called loadFile(). in the run method.
In the class where i need to load the file ,
I create a mythread and,
connect the loadFile signal to a loadFile slot.
the the signal triggers fine and i load the file, but the gui still stalls,
which i think it means that im still running on the main thread. not on the thread i created.
so, Please let me know what im missing and what the mistake im making and how can i fix it.
Thanks
Jesse.
Bookmarks