[Qt-interest] How to stop threads started byQFileSystemModel(QFileInfoGatherer, QWindowsFileSystemWatcherEngine)?

Scott Aron Bloom Scott.Bloom at sabgroup.com
Thu Aug 20 18:39:40 CEST 2009


So does this mean, after all is said and done, when you properly delete
the model, things are unloading for you?
Scott

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Niels Dekker -
no return address
Sent: Thursday, August 20, 2009 9:30 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to stop threads started
byQFileSystemModel(QFileInfoGatherer,QWindowsFileSystemWatcherEngine)?

Thanks for your reply, Thiago.  Now I think I've made a major bug:

>> Our code basically does:
>>
>>   QFileSystemModel* fileSystemModel = new QFileSystemModel();
>>   treeView->setModel(fileSystemModel);

Until now I was assuming that in this case, by calling setModel, 
treeView would take over the ownership of fileSystemModel.  Which is not

the case, as I've just read from the documentation.  Because I didn't 
properly delete my fileSystemModel, those threads were kept alive for 
too long.  I'm sorry for the noise!

  Kind regards, Niels 

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list