How to display folders and files in listView but also, how to include dot and dot dot paths. I can simply display files and folders using QFileSystemModel, but dot dot is not being displayed.
Thanks for any hjalp.
How to display folders and files in listView but also, how to include dot and dot dot paths. I can simply display files and folders using QFileSystemModel, but dot dot is not being displayed.
Thanks for any hjalp.
have a look at Fetch more example in Qt examples, I remember i could see . & .. in that example.
Thanks :-)
The QFileSystemModel is usually intended to be used with a tree view, so it doesn't need the dot and dotdot entries for navigation.
You could try resetting the filter (setFilter) so that these two are part of the allowed set.
If that does not work, I would suggest a simple custom list model that uses QDir::entryList/entryInfoList internally.
Cheers,
_
Bookmarks