summaryrefslogtreecommitdiff
path: root/examples/quickcontrols/filesystemexplorer/qml/FileSystemView.qml
Commit message (Collapse)AuthorAgeFilesLines
* Fix filesystemexplorer example to work in macOS bundlesAlexandru Croitor2023-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FileSystemModule qmldir was explicitly put into the "/" resource prefix, but that prefix is not a default qml import path. That caused the qml module not to be found when building on macOS as an app bundle, which relies only on resources and not the file system to find the module. To ensure the module qmldir is found in the resources, we want it to be placed in the default qml import path ':/qt/qml'. To do that, remove the previously specified RESOURCE_PREFIX option and enable the QTP0001 policy by requiring Qt 6.5+, which will put the module qmldir into :/qt/qml/FileSystemModule/qmldir. Because the policy also changes the resource prefix for other resources (images), adjust all Image source urls to be relative paths (relative to the component), instead of absolute paths. Also adjust the qmake generated qrc file to place the files into the new resource prefix. Amends 213e932e138d460159487a624838aa7d3bcffb4a Fixes: QTBUG-112683 Change-Id: I5205cf6d399a6faaf7cce68d55c71dade37479a7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Add File System Explorer exampleDennis Oberst2023-02-141-0/+99
This example shows the customization of Qt Quick Controls by implementing a simple file system explorer. Using a C++ model, entries are visualized in a TreeView, and text files can be read. Fixes: QTBUG-108289 Change-Id: I966dcf65e40d3b727889dc14c65edd0ffcc1b878 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>