Filer icon indicating copy to clipboard operation
Filer copied to clipboard

Column view with expandable folders

Open kingemir opened this issue 4 years ago • 4 comments

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

kingemir avatar Jul 24 '21 14:07 kingemir

Maybe the new TreeView QML Type of Qt 6.3 can be used for this? https://www.qt.io/blog/qt-6.3-released

kingemir avatar Apr 13 '22 11:04 kingemir

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.

probonopd avatar Nov 27 '22 09:11 probonopd

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?

probonopd avatar Nov 27 '22 10:11 probonopd

In case anyone is wondering, this is what we are after.

image

KDE Dolphin has it.

probonopd avatar Nov 27 '22 10:11 probonopd