Column view with expandable folders
as in Finder.
down arrow key expands a folder, up arrow key collapses it. Right arrow key brings the cursor inside the folder, left arrow key brings you to the parent folder
Maybe the new TreeView QML Type of Qt 6.3 can be used for this? https://www.qt.io/blog/qt-6.3-released
Actually, it is a TreeView already... folderview.cpp has:
if(mode == DetailedListMode) {
FolderViewTreeView* treeView = new FolderViewTreeView(this);
connect(treeView, &FolderViewTreeView::activatedFiltered, this, &FolderView::onItemActivated);
treeView->setFrameStyle(QFrame::NoFrame); // probono: No border
view = treeView;
I tried:
treeView->setItemsExpandable(true); // probono: was: false; but this seems to have no effect. QUESTION: Why?
treeView->setRootIsDecorated(true); // probono: was: false; but this seems to have no effect. QUESTION: Why?
treeView->isAnimated(true); // probono
treeView->setAutoExpandDelay(2000); // probono: ms until items in a tree are opened during a drag and drop operation
treeView->setAllColumnsShowFocus(true); // probono: was: false
But it does not work. Why?
Do we need to use another model for it than the one we are using?
Maybe the new TreeView QML Type of Qt 6.3 can be used for this?
Filer is using Qt Widgets, not Qml.
Looks like we must/can make use of
#include "dirtreemodel.h"
#include "dirtreemodelitem.h"
in folderview.cpp?
Those files are used in PCManFM-Qt for a side pane, which we are not using in Filer. But possibly they can be re-used to achieve what we need here?
