From 048d40eb83e548aceac0c86b95c8daf2ee4238a1 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sun, 1 Feb 2026 13:07:27 -0500 Subject: [PATCH] Fix TreeView root index. Parent folders will now be hidden based on the root folder selection in the GUI. --- README.md | 18 ++++++++++++++++++ qml/ClideTreeView.qml | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a2fff5..f80aab6 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,24 @@ And of course, [Rust](https://www.rust-lang.org/tools/install). curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` +## Dependencies + +This project requires at least Qt 6.7. To check your Qt version + +```bash +qmake6 -query QT_VERSION +``` + +Use the [Qt Installer](https://www.qt.io/development/download) to download and install the Qt version of your choice. + +**You must set the QMAKE variable before building clide**. This should be a path to `qmake6` binary installed on your system. +The following export is the default installation path for Qt 6.7 on Ubuntu 24.04 + +```bash +export QMAKE=$HOME/Qt/6.7.3/gcc_64/bin/qmake6 +export LD_LIBRARY_PATH=$HOME/Qt/6.7.3/gcc_64/lib +``` + ## Usage To install and run clide diff --git a/qml/ClideTreeView.qml b/qml/ClideTreeView.qml index 49ca563..ea40c88 100644 --- a/qml/ClideTreeView.qml +++ b/qml/ClideTreeView.qml @@ -27,6 +27,7 @@ Rectangle { boundsBehavior: Flickable.StopAtBounds boundsMovement: Flickable.StopAtBounds clip: true + rootIndex: FileSystem.rootIndex Component.onCompleted: { FileSystem.setDirectory(root.rootDirectory) @@ -122,13 +123,13 @@ Rectangle { text: qsTr("Set as root index") onTriggered: { console.log("Setting directory: " + treeDelegate.filePath) - FileSystem.setDirectory(treeDelegate.filePath) + FileSystem.rootIndex = FileSystem.setDirectory(treeDelegate.filePath) } } Action { text: qsTr("Reset root index") onTriggered: { - FileSystem.setDirectory("") + FileSystem.rootIndex = FileSystem.setDirectory(root.rootDirectory) } } }