Hi all:
I am trying to construct a custom file manager, using QListview, QTreeview, and two QFileSystemModel!!
The QListview is set with the QFileSystemModel( Listmodel ) which is setFilter like the code below:
setFilter
( QDir::Files |
QDir::NoDotAndDotDot |
QDir::NoSymLinks );
setFilter( QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks );
To copy to clipboard, switch view to plain text mode
The QTreeview is set with the QFilesystemModel which is setFilter like the code below:
setFilter
( QDir::AllDirs |
QDir::NoDotAndDotDot |
QDir::NoSymLinks );
setFilter( QDir::AllDirs | QDir::NoDotAndDotDot | QDir::NoSymLinks );
To copy to clipboard, switch view to plain text mode
When the file manager shows up at the beginning, everything looks perfect as the first attach file.
But after few steps, the filter in the Listmodel seems to become invalid as the second attach file.
1. Double click a folder called "test", which includes a subfolder, in the treeview. And the subfolder icon shows up.
2. Choose a subfolder of the folder "test", then the listview shows the files in the subfolder
3. Choose back to the folder "test", and the listview shows all files in the folder including the subfolder.
The result is not correct with the filter being set to the Listmodel!!!
Could anyone tell me what's wrong?!?!?
Thanks in advanced.
Kenny
Bookmarks