Fix TreeView root index.

Parent folders will now be hidden based on the root folder selection in
the GUI.
This commit is contained in:
Shaun Reed 2026-02-01 13:07:27 -05:00
parent c70bba16e4
commit 048d40eb83
2 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -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)
}
}
}