Commit Graph

1734 Commits

Author SHA1 Message Date
Kai Köhne 2e6403f8bf 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.

Pick-to: 6.5
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>
2023-05-02 12:12:35 +02:00
Matthias Rauter 30c3a65b7b 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.

Pick-to: 6.5
Change-Id: I60c1daef5144d7431605b0dc7dbedc0723a17fe0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-20 22:23:16 +00:00
Matthias Rauter 3b12b19847 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
Pick-to: 6.5
Change-Id: Ied953a423954342c02e613af618be0784d6397ee
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-21 00:23:15 +02:00
Oliver Eftevaag b65c0ce133 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.

Pick-to: 6.5
Change-Id: I2a6792800ef3b8a0dc596632dcd3b7d76aa08fe3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-20 22:02:39 +02:00
Oliver Eftevaag 8b856a7d08 Remove qmllint warnings in particle emitters example
Pick-to: 6.5
Change-Id: Ibdf9bb196454bcfa4c46d237aa69928d3bc9a7a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-19 20:01:08 +02:00
Oliver Eftevaag 482d6035a4 fix qmllint warnings in particle attractors example
Pick-to: 6.5
Change-Id: Ic3df17364aacd7aa02e843fd971470aa861df036
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-19 20:01:08 +02:00
Alexandru Croitor 32f6cbe9f0 Fix filesystemexplorer example to work in macOS bundles
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 213e932e13

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>
2023-04-12 09:36:57 +02:00
Topi Reinio 820516ec76 Doc: Use the \examplecategory macro to tag examples
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>
2023-04-11 15:27:41 +00:00
Bumjoon Park a7248458f7 Imageelements example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5
Change-Id: I39236ffa20fd1131609f170c64ecb4e68273539a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-04 06:09:43 +00:00
Oliver Eftevaag dfa8be8788 Use qsTr() for user facing strings in particle attractors example
Pick-to: 6.5
Change-Id: I8025b5dde59706827cb1bf546d03c6088f4600de
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-03-31 17:34:42 +02:00
Olivier De Cannière 405bd42998 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.

Pick-to: 6.5
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>
2023-03-30 18:02:16 +02:00
Sami Shalayel 6913084b0d Remove DomItem::loadFile code-duplication and use correct environments
The loadFile overload (in DomItem, DomEnvironment and DomUnivers) for
different files (in-memory files and files that needs to be loaded from
disk) are either copypasted or just calling the other overload.

Encapsulate the file-related arguments of all loadFile overloads into a
new struct called FileToLoad, such that the copypasted overloads can be
removed. Use the static factory function FileToLoad::fromMemory and
FileToLoad::fromFileSystem to create the FileToLoad struct.

In addition, FileToLoad allows to specify the environment in which a
file should be loaded. Prior this commit, myEnv.loadFile() was creating
a new environment for each loaded file.

Change-Id: I3b6acb681cb77faefdaa447d985bdfbe4f6a9ce2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-29 19:07:25 +02:00
Friedemann Kleint a841da2c75 Gallery/Text editor: Update example logos
Pick-to: 6.5
Change-Id: I552edf074958be3af8c72042e65c6586308f434f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-27 08:22:16 +01:00
Bumjoon Park 023849fce4 Keyinteraction example: Update by coding conventions from official doc
- string are translated.
- JS statements no longer end with semi-colon.
- Fix qmllint warning.

Pick-to: 6.5 6.5.0
Change-Id: I83f2b702c9bb9f02f86728e2277297272cd75251
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-27 12:45:36 +09:00
Bumjoon Park 06985ea991 Positioners example: Update by coding conventions from official doc
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5 6.5.0
Change-Id: I2c8077cea2bd55ec6a407eca85394a667c6a289e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-23 15:29:45 +09:00
Topi Reinio 9c8a63b6c0 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.

Pick-to: 6.5
Change-Id: I90c67b8c3f3bbe901fa083f781e9056da7763671
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-03-20 21:40:00 +00:00
Bumjoon Park b1115d957f 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.

Pick-to: 6.5 6.5.0
Change-Id: I33958c414537aff32814f4ef2f04c73a03dc5295
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-20 17:16:23 +09:00
Oliver Eftevaag ef7c39ecf5 Gallery example: translate all user facing strings
This patch wraps user facing strings inside qsTr()

Task-number: QTBUG-110989
Pick-to: 6.5
Change-Id: I3c5220ba7b552101c006d10c4c86efe8c2b8843c
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-16 16:21:34 +01:00
Dennis Oberst c5daa8cd8f File System Explorer example: Add to qmake targets
Amends 213e932e13.

Task-number: QTBUG-108289
Change-Id: Idd1012761579faae76a8b9b22deb7e51c93a4cd0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-16 14:03:21 +00:00
Bumjoon Park 354e727c40 MouseArea example: Update by coding conventions from official doc
- Fix qmllint warning.
- string are translated.
- JS statements no longer end with semi-colon.

Pick-to: 6.5 6.5.0
Change-Id: I379b3fe961c4491ab29ae8f09fc2e53c8f405c5e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-15 17:13:56 +09:00
Fabian Kosmale e0c4a5ecf9 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.

Pick-to: 6.5
Task-number: QTBUG-110649
Change-Id: Ie23b26379e7ea72271d793a6928a3757cde2cb12
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-10 16:37:11 +01:00
Oliver Eftevaag e61d555a6d 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).

Pick-to: 6.5
Change-Id: Idbf8a472ca5ba5385d1368aadd608e95231a07f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-10 10:08:14 +01:00
Oliver Eftevaag ba79f20f31 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.

Pick-to: 6.5
Change-Id: I9664cc2291be2f642dc2d9d27b6c356880a491c7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-10 10:04:01 +01:00
Shawn Rutledge 9677fcf9aa 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
Pick-to: 6.5
Change-Id: Ia2f78a7d1e758fc717078b6aa44a0f6716afd227
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-10 00:04:02 +01:00
Tor Arne Vestbø 2eb1494bdc Adapt quick/window example to AUTO_RESOURCE_PREFIX
The source code was changed in d270c51f81
but without updating the qrc file.

Pick-to: 6.5
Change-Id: I7229c04611e306bf6867caad596cb4a619ce3624
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-07 14:00:50 +01:00
Laszlo Agocs dda2aa6663 Add embeddedinwidgets example doc page
Pick-to: 6.5
Change-Id: If7c2473695739d743179b143ccf84433b7f5ddbf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-07 12:01:27 +01:00
Laszlo Agocs 3a669d56e9 Revive embeddedinwidgets example
Pick-to: 6.5
Change-Id: Id303cb014546db76b15a15ede83c8e1862756ef4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-07 12:01:23 +01:00
Santhosh Kumar 730c1d1630 Improve gallery example
* Fix qmllint warnings
  * Added support for landscape mode
  * Updated docs

Fixes: QTBUG-110989
Pick-to: 6.5
Change-Id: Id7422ad19b4336c64c866309dd07116d982ecff2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-07 10:24:50 +01:00
Laszlo Agocs 348f831712 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.

Pick-to: 6.5 6.5.0
Change-Id: Ice08b1271aff3cf13d6be700bb4a86239bb46f7d
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2023-03-07 10:24:50 +01:00
Bumjoon Park 26446d3b7e 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.

Pick-to: 6.5 6.5.0
Change-Id: Ibdf6879e6474a976bbcff5d5e3c28c98db55e9e0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-06 01:41:03 +00:00
Thomas Zander 3af897fb54 Example: no longer use hardcoded colors and make text readable
In a dark-theme setup, the hardcoded backgrounds of white ended up
with a white text on white background.

This changes things to simply use the basic palette also used by
the Label and CheckBox components.

Change-Id: I2a983dc1b57b05559dcb3c032e587ef0f65c4a1c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-03 19:44:37 +01:00
Oliver Eftevaag 746824b49a 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
Pick-to: 6.5 6.5.0
Change-Id: I0ffee43046d4fb71e64f04008b444e11dc8b21ff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-03 19:44:34 +01:00
Olivier De Cannière d023d149d9 NetworkAccessManagerFactory: Complete documentation page with snippets
Pick-to: 6.5 6.5.0
Fixes: QTBUG-110657
Change-Id: I063eb4ac25cbe226b5a996014042515d6ada5468
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-03 12:02:00 +01:00
Santhosh Kumar c2b09e89da Remove side-panel and swipe-to-remove quickcontrol examples
The quickcontrol feature represented in side-panel and swipe-to-remove
were already part of gallery example and hence, removing these two
examples

Fixes: QTBUG-110989
Pick-to: 6.5.0
Change-Id: I496dfe7ee2bea98f918b4e3b72673388c51cda6b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-03 07:37:00 +00:00
Shawn Rutledge 024794255d 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

Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-96915
Change-Id: Iee2f4ef774de7862d93c7e4cdf7b2b5e0553bec4
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-03-02 20:31:13 +01:00
Oliver Eftevaag 12e4871465 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

Pick-to: 6.5 6.5.0
Change-Id: Ibe0d0750d48018b618a5cf8c3bcecb7e29488274
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-02 17:54:31 +01:00
Oliver Eftevaag d5d203cd63 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

Pick-to: 6.5 6.5.0
Change-Id: I4b1b3826ee01cb591cf4a92fef68957964554641
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-03-02 17:54:31 +01:00
Sami Shalayel c48f705f43 qmldom: link qmldomloadeditwrite example to non-standalone qmldom
Instead of linking the example to a standalone build, link it
directly to a normal (=non-standalone) Qt qmldom library.

Link the qmldomloadeditwrite example to the qmldom library (instead of
including the qmldom library as a subfolder in the CMakeLists.txt) and
fix the includes to point to <QtQmlDom/private/<headers>_p.h>.

Change-Id: I6f20ac51199d89b4b3ca03b34e090ac6e495715f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-03-02 08:59:15 +00:00
Oliver Eftevaag 32e1287f3f 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.

Pick-to: 6.5
Change-Id: I157ab9c3ba687f6e0998f907f064014d03c5902f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-24 12:39:55 +01:00
Friedemann Kleint 211d578def File System Explorer example: Make QMimeDatabase a static variable
QMimeDatabase is potentially expensive to initialize, avoid
doing this repetitively.

Amends 213e932e13.

Task-number: QTBUG-108289
Change-Id: I66e5aeb22ffade9b86635e27b9d518c9e40aee4f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-02-22 08:16:55 +01:00
Oliver Eftevaag dc58fc1f10 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

Pick-to: 6.5
Change-Id: Ic02b7b15a8aea9387d93ab024f05feeab8a84016
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-21 19:45:44 +01:00
Amir Masoud Abdol 8f7080fd09 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.

Pick-to: 6.5
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>
2023-02-21 19:45:44 +01:00
Thomas Zander 03b75a0baa Simplify dragNDrop example and remove unneeded alias
Pick-to: 6.2 6.4 6.5
Change-Id: Ia0e5d5dc46a60b6d88864b3250f8cf91b03b897f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-02-21 06:02:19 +00:00
Shawn Rutledge 40e2811843 Use SequentialAnimation.loops in FlashAnimation in handlers example
It looks less tedious. Amends 8503f884bb

Pick-to: 6.2 6.4 6.5
Change-Id: I85690e6a8ceac4ebec1c00bcbbf6a81108096e6c
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-21 07:02:18 +01:00
Kaj Grönholm 6a87a0fb8d 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
Pick-to: 6.5
Change-Id: I27f6ad2edc220a7f5f625f6dae23159318fa20e2
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2023-02-16 14:44:56 +02:00
Friedemann Kleint 3689e9cc4a 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]

Pick-to: 6.5 6.4 6.2
Change-Id: I88d7f30247876f55b0114785efcf4ce580de0ab8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-02-16 08:04:48 +00:00
Dennis Oberst 213e932e13 Add File System Explorer example
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>
2023-02-14 13:32:13 +01:00
Joerg Bornemann 05d713a2ba CMake: Fix configuration errors in quickcontrols chat tutorial
Amends 32dac75fb4.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I4fb2ca6d7ce29f6495c7f2bacaeb3596d1fd8e08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-02-14 08:57:02 +00:00
Fabian Kosmale 05683ad15d 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>
Pick-to: 6.4 6.5
Change-Id: Ib23fb31b3d0a2c309c98bf762cea1a8c05080c38
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-13 16:10:19 +00:00
Tor Arne Vestbø c0918d6306 Adapt to Qt::Appearance to Qt::ColorScheme rename
Pick-to: 6.5
Change-Id: I5830af713e024fa9a7086e8c56e6808ff8593394
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-13 12:52:54 +01:00