I'm developing a Qt application on Windows. To show the files of a specific folder, I'm using QTreeView together with QFileSystemModel. So far so good, but I came across a very specific issue which is driving me nuts: while I'm with a folder expanded in my application, I can't do anything with its parent folder.
I built a small project only to show this issue. Here's how I define my QFileSystemModel and apply it to my QTreeView:
QFileSystemModel *myModel = new QFileSystemModel;
myModel->setRootPath(myRootPath);
ui->treeView->setModel(myModel);
To exemplify my problem, check out this image
While I have "Test Folder 2" not expanded, I can do what I want to "Test Folder". I can rename, move, or even delete via Windows Explorer, and everything is applied to my program. However, when I expand "Test Folder 2", suddenly my "Test Folder" is not editable anymore. Windows says the folder is "open in another application".
I believe anyone can reproduce this issue with the three lines above, so I don't think it's a project specific problem. Does anyone knows why this is happening?
EDIT: Apparently this is a windows only problem. Just tried on linux and it worked just fine. Is this a NTFS problem? Any ideas?