Commit Graph

1724 Commits

Author SHA1 Message Date
Kai Köhne 222a5601a9 Examples: Use versioned CMake targets for Qt modules
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.

Task-number: QTBUG-113277
Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 2e6403f8bf)
2023-05-03 12:32:40 +02:00
Matthias Rauter 8fddd2a85e Change hierarchy level of MouseFeedbackSprite in pointerhandler example
Hover events are no longer propagated to siblings when they have been
accepted by an item, at least for the time being. This patch changes
the hierarchy such that it works either way.

Fixes: QTBUG-111322
Change-Id: Ied953a423954342c02e613af618be0784d6397ee
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3b12b19847)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-26 10:45:00 +00:00
Matthias Rauter 3591fe2456 Fix button handling in MouseFeedbackSprite of pointerhandler example
HoverHandler does not react to button presses. Images to indicate button
presses are loaded but never shown because of this. This patch adds an
additional PointHandler which reacts to button presses.

Change-Id: I60c1daef5144d7431605b0dc7dbedc0723a17fe0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 30c3a65b7b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-26 10:45:00 +00:00
Oliver Eftevaag 33beb3ff2a Particle system example: qmllint and qsTr()
User facing strings are being translated, and all qmllint warnings are
gone. JavaScript statments no longer end with semi-colon, and some
whitespace changes have been made.

Change-Id: I2a6792800ef3b8a0dc596632dcd3b7d76aa08fe3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit b65c0ce133)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-25 17:39:09 +00:00
Oliver Eftevaag 0fee516d99 Remove qmllint warnings in particle emitters example
Change-Id: Ibdf9bb196454bcfa4c46d237aa69928d3bc9a7a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 8b856a7d08)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-19 20:05:52 +00:00
Oliver Eftevaag 0ba8826c2f fix qmllint warnings in particle attractors example
Change-Id: Ic3df17364aacd7aa02e843fd971470aa861df036
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 482d6035a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-19 20:05:44 +00:00
Bumjoon Park 8cf93156df Imageelements example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Change-Id: I39236ffa20fd1131609f170c64ecb4e68273539a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit a7248458f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-04 08:18:34 +00:00
Oliver Eftevaag 3f22df3417 Use qsTr() for user facing strings in particle attractors example
Change-Id: I8025b5dde59706827cb1bf546d03c6088f4600de
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit dfa8be8788)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-31 18:40:43 +00:00
Oliver Eftevaag 80fb1a2278 Gallery example: translate all user facing strings
This patch wraps user facing strings inside qsTr()

Task-number: QTBUG-110989
Change-Id: I3c5220ba7b552101c006d10c4c86efe8c2b8843c
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit ef7c39ecf5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-31 16:09:35 +00:00
Olivier De Cannière d740e2753e Doc: Revamp "Extending QML" examples into a tutorial
The examples in the "Extending QML" series were often redundant with the
information of the "Writing QML Extensions with C++" tutorial, had
outdated code and sometimes had no documentation. The examples that
covered topics not mentioned in the first tutorial were revamped into a
second "advanced" tutorial extending the first one. The others were
removed. The remaining examples were largely based on the same example
code of a birthday party. This code was slightly adapted and separated
into 7 states, each building upon the previous, with the code change
illustrating the associated feature. A tutorial page, in the style of
the first one, was added documenting the different QML features and
the required code changes in the example project.

Links in the documentation from and to the affected pages were update
as best as possible.

Fixes: QTBUG-111033
Change-Id: I9d97e8b32b128c1624d67525996fa14d493909d3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 405bd42998)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-30 18:04:10 +00:00
Bumjoon Park 77d5f50f13 Keyinteraction example: Update by coding conventions from official doc
- string are translated.
- JS statements no longer end with semi-colon.
- Fix qmllint warning.

Change-Id: I83f2b702c9bb9f02f86728e2277297272cd75251
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 023849fce4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-30 06:48:40 +00:00
Friedemann Kleint dfef3f6f3e Gallery/Text editor: Update example logos
Change-Id: I552edf074958be3af8c72042e65c6586308f434f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit a841da2c75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-28 08:01:04 +00:00
Bumjoon Park 9d9938855d Positioners example: Update by coding conventions from official doc
- string are translated.
- JS statements no longer end with semi-colon.

Change-Id: I2c8077cea2bd55ec6a407eca85394a667c6a289e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 06985ea991)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-24 08:40:28 +00:00
Topi Reinio af418168b1 Doc: Fix documentation warnings
* Remove \generatelist example[files|images] commands, they do not
  produce any output, only warnings.
* Add missing full stop to \brief descriptions.

Change-Id: I90c67b8c3f3bbe901fa083f781e9056da7763671
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 9c8a63b6c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-20 23:43:20 +00:00
Bumjoon Park 1aaafed88f Dynamicview example: Update by coding conventions from official doc
- Fix qmllint warning.
- Fix runtime warning.
- string are translated.
- JS statements no longer end with semi-colon.

Change-Id: I33958c414537aff32814f4ef2f04c73a03dc5295
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit b1115d957f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-20 11:10:34 +00:00
Bumjoon Park fff7e30de3 MouseArea example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Change-Id: I379b3fe961c4491ab29ae8f09fc2e53c8f405c5e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 354e727c40)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-15 10:28:22 +00:00
Olivier De Cannière f0882a7f1f NetworkAccessManagerFactory: Complete documentation page with snippets
Fixes: QTBUG-110657
Change-Id: I063eb4ac25cbe226b5a996014042515d6ada5468
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d023d149d9)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-11 15:53:04 +01:00
Bumjoon Park 0fe40e0f0b Drag and Drop example: Improve usage of best practices
Update the example by our coding conventions from our official
documentation.

- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Change-Id: Ibdf6879e6474a976bbcff5d5e3c28c98db55e9e0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 26446d3b7e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-11 09:02:06 +00:00
Fabian Kosmale 3b903552d2 examples: Remove shell example
We did not document it anywhere, the code is rather dated, and if we
want to promote QML as a scripting engine/an interpreter, we would need
to invest quite a bit more effort into a showcase.

Thus, remove the example for now.

Task-number: QTBUG-110649
Change-Id: Ie23b26379e7ea72271d793a6928a3757cde2cb12
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit e0c4a5ecf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-11 02:33:49 +00:00
Oliver Eftevaag 8ae4ab2e04 Shapes example: adhere to guidelines
- Fix all qmllint warnings.
  (except for main.qml, interactive.qml, and sampling.qml)
- Translate user facing strings when it makes sense to do so.
- Mark readonly properties as 'readonly'.
- Avoid binding on multiple properties on a single line.
  (except for tiger.qml).

Change-Id: Idbf8a472ca5ba5385d1368aadd608e95231a07f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit e61d555a6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-10 15:27:47 +00:00
Oliver Eftevaag 89f0ba496b Text example: adhere to guidelines
- mark readonly properties as readonly.
- Use qsTr() on user facing strings that would be sensible to localize.
- Removed unused lines of code.
- Separate lines with multiple bindings into multiple lines instead.

Change-Id: I9664cc2291be2f642dc2d9d27b6c356880a491c7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit ba79f20f31)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-10 15:27:40 +00:00
Shawn Rutledge b3c04bfc27 handlers example: Add TapHandler single/doubleTapped signal feedback
- reserve the borderBlink feedback for these signals: the flashAnimation
  feedback is enough to show the regular tapped signal
- make the flashing border more obvious: wider on a lighter background
- make the border even wider for a double-tap
- just blink once; the 3-blink animation looked nice, like classic
  macOS, but was a bit disorienting if you are tapping multiple times
  and trying to count which signals got emitted
- stop the animation before starting the double-tap animation, to avoid
  missing it: usually the double-click interval is less than 500ms

Followup to d3f2c6ac42

Task-number: QTBUG-65088
Task-number: QTBUG-107264
Change-Id: Ia2f78a7d1e758fc717078b6aa44a0f6716afd227
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 9677fcf9aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-10 06:22:30 +00:00
Laszlo Agocs f62aa151ef Add embeddedinwidgets example doc page
Change-Id: If7c2473695739d743179b143ccf84433b7f5ddbf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit dda2aa6663)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-07 21:01:42 +00:00
Laszlo Agocs c5df41d9c5 Revive embeddedinwidgets example
Change-Id: Id303cb014546db76b15a15ede83c8e1862756ef4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 3a669d56e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-07 21:01:36 +00:00
Santhosh Kumar 81e1b52042 Improve gallery example
* Fix qmllint warnings
  * Added support for landscape mode
  * Updated docs

Fixes: QTBUG-110989
Change-Id: Id7422ad19b4336c64c866309dd07116d982ecff2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 730c1d1630)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-07 21:01:35 +00:00
Tor Arne Vestbø 4b8337c09d Adapt quick/window example to AUTO_RESOURCE_PREFIX
The source code was changed in d270c51f81
but without updating the qrc file.

Change-Id: I7229c04611e306bf6867caad596cb4a619ce3624
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 2eb1494bdc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-07 21:01:29 +00:00
Laszlo Agocs 31e7099346 Add doc page for MultiEffect examples
MultiEffect is a new feature in Qt 6.5 and its examples must have
at least a basic documentation page.

Change-Id: Ice08b1271aff3cf13d6be700bb4a86239bb46f7d
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
(cherry picked from commit 348f831712)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-07 21:01:28 +00:00
Oliver Eftevaag 6e46eb61a2 Convert XMLHttpRequest example to a snippet and add doc page
The XmlHttpRequest is poorly documented, and should have its own
documentation page, instead of being part of the qml global object page.

The XmlHttpRequest example might as well be converted to a snippet, that
can be present on the new doc page.

Fixes: QTBUG-110003
Change-Id: I0ffee43046d4fb71e64f04008b444e11dc8b21ff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 746824b49a)
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-03-07 09:00:40 +01:00
Shawn Rutledge 392cbf5e7b Document the Pointer Handlers example
Animated gifs were captured with byzanz-record, then converted to webp:
gif2webp -lossy -min_size -q 40 -m 6 -mt -metadata none in.gif -o out.webp

Fixes: QTBUG-96915
Change-Id: Iee2f4ef774de7862d93c7e4cdf7b2b5e0553bec4
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 024794255d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-03 05:13:38 +00:00
Oliver Eftevaag 8211d538d1 Canvas example: Improve usage of best practices
This commit updates the example in order to adopt as many best
practices and follow our coding conventions from our official
documentation.

- qmllint will report no erros with this patch (As long as the shared
  module is imported).
- strings are translated.
- JS statements no longer end with semi-colon.
- Removed unused properties and marked those that are only read as
readonly

Change-Id: Ibe0d0750d48018b618a5cf8c3bcecb7e29488274
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 12e4871465)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-02 19:31:19 +00:00
Oliver Eftevaag 9947c9d2a9 Localstorage example: Follow coding conventions better
- Use let/const instead of var, when possible.
- Removed all warnings generated by qmllint.
- Better null checks with null coalescing operator

Change-Id: I4b1b3826ee01cb591cf4a92fef68957964554641
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit d5d203cd63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-03-02 19:31:17 +00:00
Oliver Eftevaag f5fb77bf76 PointerHanders FakeFlickable: Fix ambiguous references
The max property is declared inside the "knob" rectangle.
The id of the rectangle should be used, in order to reference it
correctly.

Change-Id: I157ab9c3ba687f6e0998f907f064014d03c5902f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 32e1287f3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-24 14:43:33 +00:00
Oliver Eftevaag 7752e7af91 quickwidget and tableview: Make example cmake files adhere to guidelines
- Add qt_standard_project_setup(REQUIRES 6.5)
- Use PRIVATE linkage
- Set WIN32 and MACOSX_BUNDLE properties directly in qt_add_executable()

amends 94e3cf3d95eda294cd578bea01c04e9527a9fd68

Change-Id: Ic02b7b15a8aea9387d93ab024f05feeab8a84016
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit dc58fc1f10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-22 09:04:17 +00:00
Amir Masoud Abdol db81d9f549 Replace AUTO_RESOURCE_PREFIX with Qt CMake Policy in examples, tests
Every instance of AUTO_RESOURCE_PREFIX has been replaced by either
qt_standard_project_setup(REQUIRES 6.5) or with
qt_policy(SET QTP0001 NEW), mainly in tests.

In addition, I added a warning message for the case where
AUTO_RESOURCE_PREFIX is used.

Task-number: QTBUG-96233
Change-Id: I323a15e9d0bb5fe6ba649365314af9fc2ad67bda
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 8f7080fd09)
2023-02-22 10:04:10 +01:00
Shawn Rutledge 67b4a0cb96 Use SequentialAnimation.loops in FlashAnimation in handlers example
It looks less tedious. Amends 8503f884bb

Change-Id: I85690e6a8ceac4ebec1c00bcbbf6a81108096e6c
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 40e2811843)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-21 14:49:42 +00:00
Thomas Zander fbc889e677 Simplify dragNDrop example and remove unneeded alias
Change-Id: Ia0e5d5dc46a60b6d88864b3250f8cf91b03b897f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 03b75a0baa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-21 14:49:13 +00:00
Kaj Grönholm c85dca6aa6 Update the custom MultiEffect
Re-export the example custom MultiEffect component with the latest QQEM
version. Also add copyright headings into the project.

Task-number: QTBUG-111150
Change-Id: I27f6ad2edc220a7f5f625f6dae23159318fa20e2
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
(cherry picked from commit 6a87a0fb8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-16 14:56:24 +00:00
Friedemann Kleint 4022acce58 Chat tutorial: Fix deprecation warning
Adapt to qtbase/14f9f00fdb2dc428610c08e3d9d03e38e9602166, fixing:
sqlcontactmodel.cpp:40:13: warning: void QSqlQueryModel::setQuery(const QSqlQuery&) is deprecated: QSqlQuery is
 not meant to be copied. Pass it by move instead.
 [-Wdeprecated-declarations]

Change-Id: I88d7f30247876f55b0114785efcf4ce580de0ab8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 3689e9cc4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-16 10:08:14 +00:00
Joerg Bornemann 14133bb718 CMake: Fix configuration errors in quickcontrols chat tutorial
Amends 32dac75fb4.

Task-number: QTBUG-109394
Change-Id: I4fb2ca6d7ce29f6495c7f2bacaeb3596d1fd8e08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 05d713a2ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-14 12:32:17 +00:00
Fabian Kosmale 95cda280a8 Fix locale example
Instead of fetching data from the view, we should rather fetch it from
the model, which avoids a bug with casting when the currentItem is null.
Use the opportunity to use a typed list for the model instead of a plain
JS array.

Original-patch-by: Kai Köhne <kai.koehne@qt.io>
Change-Id: Ib23fb31b3d0a2c309c98bf762cea1a8c05080c38
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 05683ad15d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-13 19:51:23 +00:00
Tor Arne Vestbø 3fda2cb072 Adapt to Qt::Appearance to Qt::ColorScheme rename
Change-Id: I5830af713e024fa9a7086e8c56e6808ff8593394
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c0918d6306)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-13 17:03:47 +00:00
Mitch Curtis ed0e789230 Remove unused code in attachedstyleproperties example
Amends 49b9f1f1e8.

Change-Id: Ia0ab5ab01397c2a60ee119823936d68383ccc8b6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 528de1de71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-13 08:46:18 +00:00
Friedemann Kleint 7057d06b90 Examples: Exclude tutorials from CMake Unity (Jumbo) builds
They don't build due to clashing static helper functions.

Task-number: QTBUG-109394
Change-Id: I57e407ce4ac3342ec0dbd52b5cf958f44a18e4ae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
(cherry picked from commit 32dac75fb4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-11 06:52:58 +00:00
Kaj Grönholm 2843479129 Add custom MultiEffect into testbed example
Add CustomMultiEffect QQEM project and the effect exported from it into
the MultiEffect testbed example. This can be used to validate the QQEM
MultiEffect node compatibility with the Qt Quick MultiEffect.

Task-number: QTBUG-109740
Change-Id: I596bf54316ab70b85b1ace33a433a4109c43b239
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
(cherry picked from commit 3b5aea849f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-08 09:34:02 +00:00
Friedemann Kleint 65586f1e6c Examples: Add missing include guards
Task-number: QTBUG-109394
Change-Id: I968865958770f6282ab6f79dc9b2becf4f7795af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit aeec621865)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-04 11:57:46 +00:00
Sze Howe Koh 7301e4d5bf Doc: Fix compile-time warnings in Attached Style Properties Example
Fixes: QTBUG-110831
Change-Id: Iee931d5595cab1c6fb40b5ddff0596ce6195788a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit ecdbc277ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-04 04:48:14 +00:00
Sze Howe Koh f47d7f6f63 Doc: Don't auto-close popup in Attached Style Properties Example
So that users can see the theme change while the popup is open

Change-Id: I9cac09badc04c5dcace45dadaa9282900b093e17
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 27878fdef7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-04 04:48:12 +00:00
Fabian Kosmale 255ee6c962 qt_add_qml_module: Make usage of AUTO_RESOURCE_PREFIX a policy
Writing AUTO_RESOURCE_PREFIX in every qt_add_qml_module call seems
rather pointless.

In addition:
- Add documentation for QTP0001.
- Adjust some of the examples to use QTP0001 policy.
- Improved the error message.

Task-number: QTBUG-96233
Change-Id: I6e19a491acba97493893bf1953fca3462296c1ea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit ec452fc6e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-02-02 02:44:54 +00:00
Shawn Rutledge ce3769e3d8 Use inline component in sidebar example rather than Loader
Originally in ca9e2a0d74 I used Loader as
a way of reusing some content in two places in one QML file, not
necessarily to test hover behavior with Loader. Inline components
are a little cleaner.

Change-Id: Ib064bdb460704bec0c714550d8935dcef8af0637
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit cae32cb2ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-01-31 22:01:42 +00:00
Ulf Hermann 1d090673bf CMake: Allow omitting the version of QML modules
Also, drop all the VERSION 1.0 lines from the examples and tests. 1.0 is
actually a bad default version since it's before all the Qt versions.

[ChangeLog][QML] You can now omit the VERSION argument to
qt_add_qml_module(). This will automatically generate the highest
possible version.

Task-number: QTBUG-99146
Change-Id: Ic10ec69b87c224e0e94e1785f65653815d4c778c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 2d44365f69)
2023-01-30 10:45:04 +01:00