Commit Graph

10 Commits

Author SHA1 Message Date
Eirik Aavitsland 815cd44fbb Doc: Add some notes about PathText usage in Quick Shapes
Note the expected fill rule, as defined by TrueType, and explain that
if the stroked outline looks bad, it's the font's fault.

Pick-to: 6.10
Change-Id: I8c4c7d319c96d2514c3b11f27a7e85b7c408a79d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2025-09-05 18:38:17 +02:00
Kai Köhne fd254513db Examples: Disable QtC junction points for examples using 'shared' directory
Task-number: QTBUG-128914
Pick-to: 6.8
Change-Id: If01f7e17c1f6c033e601e2e012745461c71f2e13
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2024-09-27 14:00:08 +02:00
Eirik Aavitsland 0aabb7c369 Use best practices in the Quick Shapes example
Circles and ellipses can now be expressed simpler with a single
PathAngleArc object, instead of two PathArcs. Similarly, use
PathRectangle instead of four PathLines.

Also fixes various minor qml issues flagged by qmllint.

As a drive-by, improves the doc of the new fillTransform property with
example code that matches one of the gallery examples.

Pick-to: 6.8
Change-Id: I4529cca08c0cffc51d495f8ce815b50c053e4aa3
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2024-07-03 19:46:31 +02:00
Fabian Kosmale 2a32ec77c0 examples: Consistently require Qt 6.8
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>
2024-07-03 08:43:43 +02:00
Eskil Abrahamsen Blomfeldt b70dc1196c Texture fill for shapes
This introduces a "fillItem" property to ShapePath. Similar to
gradient, this enables filling a shape with any texture provider
item, such as an image, a ShaderEffectSource or a layer-enabled
item.

Fixes: QTBUG-104121
Change-Id: I8748a90c825e8eb4655a4ac90648c6ae74420527
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-05-27 17:36:45 +02:00
Eirik Aavitsland 22272aefeb Add PathRectangle, a PathElement for optionally rounded rectangles
This new path element type is particularly useful for QuickShapes,
where it can be used to mimic a Rectangle item. It provides the same
API for specifying common and/or individual corner radii.

[ChangeLog][QtQuick] Add PathRectangle, a PathElement for optionally rounded rectangles

Fixes: QTBUG-123913
Change-Id: Ia0de252f70c665bd70f63aa31e3010584cc9cd8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-05-26 18:04:42 +02:00
Eirik Aavitsland 31d652d73b Add fillTransform property to ShapePath
This adds functionality corresponding to QBrush transform to QuickShapes.

Change-Id: I2b5903f8c228adec65a6f5be64e3816143879302
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-05-14 20:06:17 +02:00
Alexandru Croitor a6bd1dc3e0 CMake: Add deployment API to our examples
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>
2024-03-27 18:57:34 +01:00
Lucie Gérard 53295d9102 Correct license for examples files
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>
2024-03-21 10:41:29 +01:00
Eskil Abrahamsen Blomfeldt cb907fc47a Move Qt Quick Shapes examples back under Qt Quick
In order to be accessible from Qt Creator, the modules either has
to have a separate landing page and qdocconf, or we need it under
the same subdirectory as everything else. We currently want
Qt Quick Shapes to be like Qt Quick Particles and be documented
as part of Qt Quick, so the examples move back into a quickshapes/
subdirectory of examples/quick (like with examples/quick/particles/)

Pick-to: 6.7
Change-Id: Ib7aaa75da7c4c9eeca6edb5ede7952598f37df89
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-02-01 21:42:00 +01:00