PDA

View Full Version : Populate TableView/Model using QThread to stop GUI locking up?



Royceybaby
10th October 2007, 10:06
Noob question,

I have searched the forum and found people wanting to do similar things and they seem to find a solution but don't share any code snippets :confused:

Can someone guide me on how this can be achieved?

Thanks,
Royce

wysota
10th October 2007, 10:11
Use signals and slots. Start a thread that will "generate" model items and then emit a signal containing the item. The signal has to be connected to a slot in the model which will then add the item to its internal storage.

Here is a note about something similar:
http://blog.wysota.eu.org/index.php/2006/12/26/remote-models/