[Interest] folderlistmodel qrc:/ with tableview
Rutledge Shawn
Shawn.Rutledge at digia.com
Mon Jul 14 11:33:45 CEST 2014
On 13 Jul 2014, at 7:22 PM, Damian Ivanov wrote:
> Hi all,
>
> Is it possible to use a folderlistmodel for a tableview?
Yes the QtQuick.Dialogs FileDialog uses this implementation on platforms that don't have native dialogs; look at qtquickcontrols/src/dialogs/DefaultFileDialog.qml. (And if what you needed is a FileDialog then maybe you can just import it and use it. ;-)
> I'm trying it but the tableview is empty.
> Also with Qt Creator when I use as folder: for the folderlistmodel
> "qrc:/myprefix" and I test it with console.log(folderlistmodel.get(2,
> "fileName")) or any other index it returns files from the build
> directory..
So it seems. It's using QDir and QFileInfo internally, and the docs say that they can introspect resources. You can write up a bug if you like.
More information about the Interest
mailing list