aboutsummaryrefslogtreecommitdiffstats
path: root/examples/core
Commit message (Collapse)AuthorAgeFilesLines
* Don't use JS placeholders inside qsTr() callsJan Arve Sæther2025-10-271-1/+1
| | | | | | | | Using JS placeholders inside qsTr() is a bad practice, and makes translations impossible Change-Id: I08dffd1a718a7112a8e426a013419578ec2f16f0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Fix examples built as external projectsJoerg Bornemann2025-01-311-2/+2
| | | | | | | Usage of a private module needs a respective find_package call now. Change-Id: I20f7571e11ab9b2ca6d185b4834e72100d9ce2d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* examples: Consistently require Qt 6.8Fabian Kosmale2024-07-031-1/+1
| | | | | | | | | | | | This prevents policy warnings in a few cases, and we want people to opt-in to new policies, so make our examples copy'n'paste friendly. Pick-to: 6.8 Task-number: QTBUG-126201 Task-number: QTBUG-126468 Change-Id: Iefa666b61c2d2f767da3583f0f6efd8e4a2169e5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* CMake: Add deployment API to our examplesAlexandru Croitor2024-03-271-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Projects were modified using the tool at: https://git.qt.io/alcroito/cmake_refactor A few examples had to be adapted manually, mostly those that build additional qml modules / plugins. The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were removed, these are not needed anymore because example directory selection is handled by the qt_internal_add_example calls. The install(TARGETS) calls were modified according to our documentation snippets for qt_generate_deploy_qml_app_script. A qt_generate_deploy_qml_app_script call was added for each executable target. Note that the deployment step will be skipped in the CI for now, because: - we enable QT_DEPLOY_MINIMAL_EXAMPLES in the CI instructions and thus set QT_INTERNAL_SKIP_DEPLOYMENT to true - standalone examples feature is not yet enabled in the CI, which means we continue to build examples in-tree, and deployment is disabled for in-tree prefix builds. A small list of examples to deploy in the CI will be chosen in the future, to ensure deployment coverage, without slowing down overall CI times due to all the *deployqt invocations. Even if deployment is disabled in the CI, the install(TARGETS) calls for each example will still run, installing into an 'installed_examples' directory, which will not be archived by the CI. The QtBundleQmlModuleForMacOS and bundle_shared code was removed, because we can now depend on the MACOS_BUNDLE_POST_BUILD option of the deployment api, to ensure macOS bundle examples run properly in the build dir. This works even in prefix in-tree builds, when installation deployment is disabled. Finally, for all examples that build additional qml module libraries or plugins, the libraries / plugins must be installed into the bin dir of each project, along with a qmldir file. This is to support running the installed project for platforms that don't have deployment api yet, like boot2qt / yocto. If we want to have super clean install / deployment rules in the future, we won't be able to avoid adding ugly per-platform conditions. The current status quo is deemed an improvement over what we had before. Pick-to: 6.7 Task-number: QTBUG-101340 Task-number: QTBUG-102056 Task-number: QTBUG-102057 Change-Id: I843d934668c25dbcd1abca52495b393579633fc5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Correct license for examples filesLucie Gérard2024-03-211-1/+1
| | | | | | | | | | | | | Example takes precedent over build system file type. According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 6.7.0 Task-number: QTBUG-121787 Change-Id: Ie8c2539e7659f53a1fd6b48f99ee883ee9aeb0a7 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Update manual tests and examples for change in default size policySanthosh Kumar2024-02-211-0/+1
| | | | | | | | | | | The size policy of item updated as part of task QTBUG-117597. This patch update existing examples and manual tests that depends on quick layout to embrace size policy change. Task-number: QTBUG-117597 Pick-to: 6.7 Change-Id: I68469a3bba3c4d3e5ed4b6eae0fd765b5206efc0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Android: Add missing manifest for permissions exampleAssam Boudjelthia2023-06-052-4/+49
| | | | | | | | | | And as a pass by, make some minor UI changes to be more mobile friendly. Task-number: QTBUG-111001 Pick-to: 6.6 Change-Id: Iab586ba9cd425d1266ca400444405bbd9437d9db Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QML API for application permissionsTimur Pocheptsov2023-06-014-0/+233
The API is based on dedicated QML types for each permission type, where each instance of the permission reports status separately. Requests for permissions are done imperatively for now, as the semantics of a declarative request were hard to nail down, and the user can easily build a declarative flow on top of the imperative API that fits their needs and semantics. Task-number: QTBUG-111001 Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Change-Id: I0ebc99e0fa0d22b0af5aa1d34851c5f0c62357c0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>