I’m trying to get QTreeView (using an underlying QFileSystemModel) to show a directory tree. If I set the RootPath to the parent directory, then I see all the children, but not the parent. If I set the RootPath to be the parent’s parent, then I see the parent directory with all its siblings. Is there a way to get it to show the parent without its siblings, and all the children?
Thanks
This works for me on Linux. I’m not claiming it’s the best implementation and I’m not sure if using backslash separators will work on Windows. I know Qt translates them to the native separator but I don’t know if it’s native separators that come out of the model’s
datamethod.