[Qt-interest] QDirModel v. QFileSystemModel ?

Stephen Collyer scollyer at netspinner.co.uk
Fri Jun 12 18:54:34 CEST 2009


Could someone explain the relative merits/demerits of these two models ?
The docs don't make it clear to me when one should be preferred over the
other (apart from the separate thread thing with QFileSystemModel).

I need to be able to:

a) display the contents of a particular directory in a treeview or listview
b) select some subset of the displayed files
c) retrieve the selected list in the form of filenames

I don't need to create/modify directories or files. Given that fairly simple
requirement, is there an obvious choice between the two ?

Also, why is there no equivalent of QFileSystemModel::setRootPath(..) ?
Does QDirModel always provide access to the whole file system ?

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090612/d47e191b/attachment.html 


More information about the Qt-interest-old mailing list