i would like to have a multiple directory view
while using QDirModel and qtreeview like this :
QDirModel *model = new开发者_如何学Python QDirModel;
QTreeView *tree = new QTreeView();
tree->setModel(model);
i can view the content of a given root directory how can i view multiple roots directory on a single widget like QTreeView
You could probably do this by making a proxy model. You'd want to add multiple QDirModel instances with different roots to the proxy model, and interpret the mapToSource and mapFromSource items appropriately. The top level of items in your tree would need to be supplied by the proxy model itself, which might make things a little tricky.
精彩评论