I'd try QFileSystemModel first.
Current code:
In this directory I have 69 Windows shortcuts. But my QListView shows only 68 . And if I doube the amount I am missing 2 shortcuts.Qt Code:
QFileSystemModel model; ui->list->setRootIndex(model.setRootPath(directory));To copy to clipboard, switch view to plain text mode
Im using Vista, could be the cause? Probably not...
I checked each file and the ones not shown where Recycle Bin, PGP Shredder and shortcut, "Vista Shortcut Manager" shortcut and SUPER © Uninstall shortcut. Apparently it doesn't show some shortcuts, I checked their properties and apparently they had no difference.
When pointed to my Pictures folder it doesnt show "Sample Pictures" shortcut. So it probably is a Windows-managed-shorcut problem.
You still need to use the Shell Namespace API if you want these "folders" on windows;
http://msdn.microsoft.com/en-us/libr...90(VS.85).aspx
A quick search came up this which gives a C++ example.
So.. thats really the only way? I didnt quite understand how to pass that to QT. I get quite confused reading MSDN documentation.It would be better if there were a QT way..
The thing is that this is out of scope of the model. Those icons are not in the filesystem, they are fake icons created on the fly by Windows Explorer (or actually the Windows desktop probably). The model, on the other hand, contains contents of the file system.
Okay. Thats understood. So the Recycle Bin and PGP Shredder appear at startup. They are "fake" icons. But what about the "Vista Shortcut Manager" shortcut and SUPER © Uninstall shortcut not appearing? They are not made on the fly and are a true "file".
Bookmarks