Revert "Try to use QSortFilterProxyModel via cxx-qt."

This reverts commit 325cf285fc.
This commit is contained in:
2026-02-01 13:07:10 -05:00
parent 325cf285fc
commit c70bba16e4
2 changed files with 21 additions and 124 deletions

View File

@@ -16,23 +16,20 @@ Rectangle {
signal fileClicked(string filePath)
// https://doc.qt.io/qt-6/qml-qtquick-treeview.html
TreeView {
id: fileSystemTreeView
anchors.margins: 15
property int lastIndex: -1
model: FileSystemSortProxyModel {
id: fs
}
model: FileSystem
anchors.fill: parent
boundsBehavior: Flickable.StopAtBounds
boundsMovement: Flickable.StopAtBounds
clip: true
Component.onCompleted: {
fs.setDirectory(root.rootDirectory)
FileSystem.setDirectory(root.rootDirectory)
fileSystemTreeView.expandRecursively(0, -1)
}
@@ -125,13 +122,13 @@ Rectangle {
text: qsTr("Set as root index")
onTriggered: {
console.log("Setting directory: " + treeDelegate.filePath)
FileSystemSortProxyModel.setDirectory(treeDelegate.filePath)
FileSystem.setDirectory(treeDelegate.filePath)
}
}
Action {
text: qsTr("Reset root index")
onTriggered: {
FileSystemSortProxyModel.setDirectory("")
FileSystem.setDirectory("")
}
}
}