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

Niels Dekker - no return address noreply at this.is.invalid
Thu Aug 20 18:29:31 CEST 2009


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 




More information about the Qt-interest-old mailing list