So this works when I don't use a QSortFilterProxyModel but when I make QTreeView use a QSortFilterProxyModel, the compiled code seg faults...
Qt Code:
proxyDirModel->setSourceModel(dirModel); treeView->setModel(proxyDirModel); // I have tried it both of these ways: treeView->setRootIndex(dirModel->index("/")); //treeView->setRootIndex(treeProxyModel->sourceModel()->index("/"));To copy to clipboard, switch view to plain text mode
How can I make this work? Right now it seems like having two QDirModels works without problems when I use one dirmodel and try to do this the right way I run into lots of problems and not a lot of good documentation...
Bookmarks