PDA

View Full Version : Cannot rename some folders with QDirModel+QTreeView?



MorrisLiang
29th April 2010, 07:25
I create a QTreeView,then add a QDirModel to it.
http://lh3.ggpht.com/_BDrOvi0HsXM/S9kkiWJ0X0I/AAAAAAAAAFI/jNIFsX7V2jM/s800/rename.png
You can see there are 4 folders under D: which are not renamable.(Neither by "F2" or "Double-Click")
Also,there is a folder under F: which is renamable.
Seems like those folders whose icon is changed cannot be renamed.
How can I rename the folder,even its icon is changed?:confused:
Does someone have a clue what's going on?Thanks~

Kumosan
29th April 2010, 08:04
Question is....can you rename them manually? Without Qt? In other words: Do you have the rights to rename them?

Btw. unrelated hint: You are using QDirModel. You might want to look into QFileSystemModel as the far superior alternative.

MorrisLiang
29th April 2010, 08:39
I have full rights to rename them(in Windows Explorer)...Besides,talking about this question,QFileSystemModel just acts like QDirModel.lol.