I'm trying to create a file explorer in qt which is working but I cannot set the root path. I am running Mac OS X and no matter what root path I put in, the treeView always begins with
"/" the top folder.
I've spent 2 hours trying to figure this out.
fileModel = new QFileSystemModel;
QString rootpath = dir.absolutePath() + "/SavedOutlines/";
//QString path = "/Users/";
fileModel = new QFileSystemModel(this);
QModelIndex idx = fileModel->setRootPath(rootpath);
It seems like it's doing it at first but then resetting back to the top directory.