I have to update the tree widget with each element visited and as far as I'm aware, one cannot use widget classes in separate threads (QThread). You are probably right that I can do that via a signals and slots (thanks for that, I don't know why I didn't think of it, it's rather obvious), but won't that "cost" roughly the same? Each time the recursive function is called, a signal will be emitted telling the GUI to update so how will it be different?
Thanks for taking the time out to explain, I appreciate it. Kind regards, William On 7 January 2013 17:51, alexander golks <[email protected]> wrote: > sounds like you're blocking the gui painting. > i would start a thread for parsing the dom and use some signals/slots to > signal the gui the current state, like: > > signals: > void startDomParsing(); > > slots: > void onDomParsingFinished() > { > delete progress; > // or whatever > } > > or instead of onDomParsingFinished() you could even connect your > QThread::finished() signal > to the progress::deleteLater() or alike... > and some signals from thread to gui slots for updateing your tree widget. > > or, call QCoreApplication::processEvents at appropriate places, if you > don't want to do it the threaded way. > > alex > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
