Commit Graph

955 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Kaj Grönholm 3b5aea849f 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
Pick-to: 6.5
Change-Id: I596bf54316ab70b85b1ace33a433a4109c43b239
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2023-02-08 07:22:29 +02:00
Friedemann Kleint aeec621865 Examples: Add missing include guards
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I968865958770f6282ab6f79dc9b2becf4f7795af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-03 15:33:07 +01:00
Ulf Hermann 2d44365f69 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.

Pick-to: 6.5
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>
2023-01-27 19:16:39 +01:00
Kaj Grönholm 396a7454e6 Adjust the MultiEffect API
Based on the API review, adjust the MultiEffect API.
- Change mask threshold Low/Up to Min/Max and for spread AtMin/AtMax.
- Change colorize to colorization so it is more symmetric with
  brightness, saturation etc.

Task-number: QTBUG-109557
Pick-to: 6.5
Change-Id: I96ff2a13e20405998c5ed0cb38ad3b5911daf94c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-01-26 12:42:33 +02:00
Oliver Eftevaag 1c6afffc94 Quick scenegraph examples: use qsTr() for user facing strings
All user facing strings should use qsTr()

Pick-to: 6.5
Change-Id: I2f776fe088b05bb046ceafbc6c29528212a2c1a0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-01-17 16:45:12 +01:00
Oliver Eftevaag f97bdd0b70 Remove forgotten examples in the 'customitems' dir
This patch removes the following examples in particular:
- progressbar
- scrollbar
- searchbox
- slideswitch
- spinner
- tabwidget

The reason for removing them is that they've clearly been forgotten,
and no longer serve a purpose.

They can only be built with qmake, since they're missing a
CMakeLists.txt file, and even if you try to build them, the build will
fail since the DECLARATIVE_EXAMPLE_MAIN macro in shared.h were at some
point updated to prepend the resource patch to have the same prefix that
the AUTO_RESOURCE_PREFIX cmake flag provides. Which had the side effect
of causing these examples to no longer build out of the box.

The purpose of the examples has been to demonstrate how to make custom
controls. Today we recommend users to instead make custom styles for
QQC2, which the flatstyle example demonstrate how to do.

Pick-to: 6.5
Change-Id: I26af18ecaef836495f0c2a7e376268b1f956b1a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-17 16:44:52 +01:00
Oliver Eftevaag 7409c217e8 Quick examples: Modernize cmake files according to our guidelines
The following changes are made to the CMakeLists.txt files in all
quick examples:

- Use PRIVATE linkage when possible.
- Use qt_standard_project_setup()
- Set WIN32 and MACOSX_BUNDLE in qt_add_executable() instead of
  set_target_properties()

Pick-to: 6.5
Change-Id: I18217585aec56794b327f103d6959879df59d68a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-16 16:16:47 +01:00
Oliver Eftevaag ae4a0c34c0 Remove spurious qDebug() statement
The qDebug() doesn't add any value to the example.

Fixes: 6.5
Change-Id: I73c1af251f342e3ed542f683dd0b3d71d92a3f58
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-01-11 13:44:35 +01:00
Oliver Eftevaag a62da4b06e Fix layouts and localstorage examples
The layouts and localstorage examples wouldn't work properly, since the
path to the initial qml file given to the engine didn't start with
"qrc:/qt/qml"

Pick-to: 6.5
Change-Id: I26b5bbf3f6e7078c4f4aba6bab6fc06451b49082
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-11 13:44:35 +01:00
Oliver Eftevaag 267da2e7a9 Make quick examples that rely on the shared files build with qmake again
In d270c51f81 the DECLARATIVE_EXAMPLE_MAIN
macro was modified to prepend the "qrc:/qt/qml" prefix to file paths that
should be loaded by the engine. But the patch forgot to update the
shared.qrc prefix, which means that the examples that relied on the
shared module, would no longer build out-of-the-box with qmake.

This patch solve the issue, so that the examples work with qmake
once again.

Pick-to: 6.5
Change-Id: I677c1e61423cf98c6a1030ce591707888456ef19
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-11 13:44:35 +01:00
Shawn Rutledge cae32cb2ec 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.

Pick-to: 6.2 6.4 6.5
Change-Id: Ib064bdb460704bec0c714550d8935dcef8af0637
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-01-05 06:04:16 +01:00
Sze Howe Koh f92a2a6798 Examples: Update custom QSGMaterialShader correctly
Pick-to: 6.5 6.4 6.2
Change-Id: I469c4f813f006ca47f9660a0c9ccfa30bbe89dc6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-01-04 10:04:36 +08:00
Shawn Rutledge e39b4572c2 map example: don't restrict pinch-zoom to center
A big advantage of PinchHandler over PinchArea is the ability to zoom
into a particular location in the target Item, so let's not fail to
show that off.

Pick-to: 6.2 6.4 6.5
Change-Id: I0f22abff99bdc60bac27e72fd5f66be4796794df
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-02 18:52:57 +00:00
Kaj Grönholm e09b72fe10 Improve blur items sizing
MultiEffect uses max 5 blur items. So to be able to divide first one 4
times without rounding, first one needs to be rounded up to next
2^4 = 16 (16,8,4,2,1). Make the first blurred item size half of the
source size (plus the rounding). This increases the blur amount and
performance and decreases texture memory usage and quality. Based on
testing it seemes like a good compromize.

Also resize bluritems only when needed.

Pick-to: 6.5
Task-number: QTBUG-109490
Change-Id: I907b48904d3f9b0414704026cc1f07c02c49a8c7
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2022-12-20 12:09:59 +02:00
Shawn Rutledge 7867a683fc Add PinchHandler.scaleAxis, rotationAxis; hold values in axes
Pointer Handlers that manipulate target item properties should now
use QQuickDragAxis consistently to:
- enforce minimum and maximum values
- hold the persistent and active values
- make those available via properties
- emit a new activeValueChanged(delta) signal when the value changes,
  so that it's possible to incrementally update a target item
  property in JS (onValueDelta: target.property += delta)

In the pinchHandler.qml example, you can use the PinchHandler to adjust
4 properties of one Rectangle independently (it requires coordination).

m_boundedActiveValue controls whether m_activeValue will be
kept between minimum and maximum. For rotation,
tst_QQuickPinchHandler::scaleNativeGesture() expects it to be,
although that seems questionable now, and may be addressed later.

[ChangeLog][QtQuick][Event Handlers] PinchHandler now has scaleAxis and
rotationAxis grouped properties, alongside the existing xAxis and yAxis;
and all of these now have activeValue and persistentValue properties.
The activeValueChanged signal includes a delta value, giving the
incremental change since the previous activeValue. The persistentValue
is settable, in case some target item property can be adjusted in
multiple ways: the handler's stored value can then be synced up with the
item property value after each external change. These features are
also added to DragHandler's xAxis and yAxis properties.

Task-number: QTBUG-68108
Task-number: QTBUG-76380
Task-number: QTBUG-76379
Task-number: QTBUG-94168
Change-Id: I78a5b43e9ba580448ef05054b6c4bc71b1834dd6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-10 03:13:57 +01:00
Kaj Grönholm fc0d469718 Add QtQuick.Effects & MultiEffect
Add new QtQuick.Effects plugin for post-processing effects.
The plan is to add essential effects directly into QtQuick,
not to duplicate Qt Graphical Effects.

Initially the plugin will contain MultiEffect which supports
7 different effects in a single ShaderEffect (brightness,
contrast, saturation, colorize, blur, shadow, mask). Combining
multiple effects into a single shader is more performant than
chaining multiple effect items. Depending on used features,
the most optimal shader gets selected.

Includes two examples demonstrating the usage of MultiEffect.

Task-number: QTBUG-106651
Change-Id: I35865030fd4b7a1f657146cee03b195451545bc6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-12-07 08:31:43 +02:00
Laszlo Agocs 81b6cc7ebb Fix typo in rendercontrol_d3d11 example
Clearly nobody has run this in recent history.

Change-Id: I77aa8acc1de1346ded034ccd47682afaba2efe2b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-11-03 15:56:06 +01:00
Ben Fletcher 7be8566719 scenegraph: Add example for QSGRenderNode based RHI rendering
Add an example to demonstrate RHI rendering in the scenegraph with a
custom QSGRenderNode.  Works for Vulkan/OpenGL/Metal/D3D rendering
directly, and into a layer.

Change-Id: I0333f63fd729312b71e51f5b6376e46f8afe1fe6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-11-01 10:39:02 -07:00
Fabian Kosmale 0ddd032ffc GameOfLife example: Fix qmllint warnings
GameOfLifeModel is a QAIM, but qmllint does not know what QAIM is by
default. Make it aware of it by explicitly depending on QtQml.Models.

Then fix the Layout related warnings found by the Quick lint plugin:
- remove the superfluous x and y values in the slider,
- and remove the empty padding Item in lieu of setting
  Layout.rightMargin on the Button to achieve the same effect.

Change-Id: I2ef6f9a1ffa276b66415ce3374eb41c34d8673b6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-26 14:00:54 +02:00
Sami Varanka 7af1f664ac Fix TypeError in dynamicview1 example
Rectangle's parent was null when setting
left and right anchors. Use
pragma ComponentBehavior: Bound and
required properties instead.

Pick-to: 6.4
Fixes: QTBUG-106645
Change-Id: Ie5b8c3a20948799363fad1332113884612d18968
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-10-19 06:59:22 +00:00