summaryrefslogtreecommitdiff
path: root/examples/quickcontrols/filesystemexplorer
Commit message (Collapse)AuthorAgeFilesLines
* Fix filesystemexplorer example to work in macOS bundlesAlexandru Croitor2023-04-126-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Doc: Use the \examplecategory macro to tag examplesTopi Reinio2023-04-111-1/+1
| | | | | | | | | | | | | | | | The '\meta category' command was used for tagging examples with a specific category, used in Qt Creators Welcome mode. As we want to also generate lists of examples belonging to a category elsewhere in the documentation, replace the command with a macro that expands to the original \meta command and also adds the example to a group using the \ingroup command. This way, the category names can be used as arguments to the \generatelist or \annotatedlist commands. Pick-to: 6.5 Task-number: QTBUG-112731 Change-Id: I673207be9dd73a010069828b92146c37e45e9143 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* File System Explorer example: Make QMimeDatabase a static variableFriedemann Kleint2023-02-221-3/+3
| | | | | | | | | | | QMimeDatabase is potentially expensive to initialize, avoid doing this repetitively. Amends 213e932e138d460159487a624838aa7d3bcffb4a. Task-number: QTBUG-108289 Change-Id: I66e5aeb22ffade9b86635e27b9d518c9e40aee4f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add File System Explorer exampleDennis Oberst2023-02-1427-0/+1367
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>