Unsolved QTreeView in single line format
-
Hi all!
Does anyone know how to set a folder explorer in a single line like the picture below?
At the moment i'm using a QTreeView and a QFileSystemModel to show a similar window like the bottom-left in the picture, but in order minimize the size of the QTreeView I would like to add a edit or bar like the one shown in red.
Thanks in advance!
avmg
-
Hi,
It's called a breadcrumb. You should check KDE's Dolphin file manager code. It does what you are looking for.
-
@SGaist said in QTreeView in single line format:
breadcrumb
Ok! I just downloaded now and i'm going to try to extract from that. Thanks!
-
@avmg said in QTreeView in single line format:
At the moment i'm using a QTreeView and a QFileSystemModel to show a similar window
Then probably you can use KBreadcrumbSelectionModel directly without reverse engeneering Dolphin.
To then display it that way you will probably need
QTransposeProxyModel
to make the model span columns instead of rows and some styling ofQTableView
to make it look nicer -
Thanks VRonin, that is probably easier.