Commit Graph

1052 Commits

Author SHA1 Message Date
Even Oscar Andersen 7796a5632e wasm: Move OpenGLUnderQml to VertexBufferObject to satisfy WebGL
To make the example work under webassembly also

Change-Id: I9eb7ab4503efcffa68d4de3008c8275f723ec659
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-06-11 12:04:07 +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
Laszlo Agocs 3d8c869768 graph example: Do not use GLSL functions as uniform names
Using textureSize in the uniform block leads to renaming it
to _textureSize when transpiling to GLSL. This is not
reflected in the reflection metadata for some reason.
For OpenGL this matters because the QRhi backend won't
be correctly able to set up the uniforms when the
names do not match. To overcome this, use a name
in the shader that does not conflict with a built-in
GLSL function. Strictly speaking the name (textureSize)
is somewhat incorrect anyway. Use texCoordScale to
express its meaning better.

Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I863e98c6d56cc46fad895763b9b5106a40e2952c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-05-27 09:36:13 +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
Kai Köhne 79c3fb123d Doc: Fix mentioning of QQW::createTextureFromNativeObject in example
The method got removed in Qt 6.0, and the example code was adjusted
accordingly (commit fb96109bbc).

While at it, also remove the mentioning of the even older
QQuickWindow::createTextureFromId(), as that is most likely
not relevant for new users looking into this example.

Pick-to: 6.6 6.7
Change-Id: I2ea3fcf3de78e13afec9e2b25aa8d4a6a9a9b571
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-19 16:15:15 +02:00
Even Oscar Andersen 793f81b1c6 Set correct shader version for CustomRenderNode example
The custom rendernode example uses the default GLSL which is:
"100es,120,150". The problem with this is that gl_VertexId only
exists in OpenGL ES 3.00 or later, and GLSL 1.30 and later
end result is that the shader compiles but does not run.

Change-Id: I1ac18e381b1e8b28368f67e4140f4bb43bb17e62
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-19 12:39:01 +02:00
Even Oscar Andersen 547de2d4e5 wasm: CustomMaterial: Change shader program so that it is accepted by WebGL
There are issues with for loops in GLSL, see for instance:
https://learnwebgl.brown37.net/12_shader_language/glsl_control_structures.html
The solution is to rewrite the shader so that it also works on WebGL.

Fixes: QTBUG-123593
Change-Id: Ia9fd4d9ef3f1b99a29d4bbabae20ad779fe4fbba
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-04-18 11:39:16 +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
Tor Arne Vestbø 655ff8592b Use new Qt configure feature for Metal
Change-Id: I603018d3f4c6a49c39f7daed25101c24edbbfc02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-25 19:03:08 +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
Frédéric Lefebvre 060caf44f8 Correct a typo in the view list. Modify "a Object" to "an Object"
Correct a typo in the view list. Modify "a ObjectModel" for
"an ObjectModel"

Task-number: QTBUG-119689
Change-Id: I96328df0d20bf264810ad9759c085d558ff600fc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-18 15:59:21 +00:00
Even Oscar Andersen a67e6bd1ad wasm: rendercontrol example -background color
This fixes the background color of the rendercontrol
example.

Essentially we cannot assume the OpenGL background color
is stored in the state, and need to set it every frame

Change-Id: I5bb14f10c4049ca2e5657cceb4550e23fbf4d968
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2024-03-16 09:06:19 +01:00
Wladimir Leuschner fddba23321 Fix duplicate HighScore when replaying SameGame Example
The onClosed slot invokes SameGame.saveHighscore function
in samegame.js. Also the startNewGame function in samegame.js
is triggering the SameGame.saveHighscore function by calling
Dialog.hide, which in turn calls the onClosed slot. This leads
to duplicate highscore entries. Moving the closing of the
dialog after the clearing of the board/score and additionally
adding a condition that if the score is 0, no highscores are
saved, the duplication is avoided.

Fixes: QTBUG-119812
Pick-to: 6.7 6.6
Change-Id: I6aa433789f197a0d1e70abc82baf893934e53be5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-03-12 15:01:39 +00:00
Laszlo Agocs 2f3bf5f515 Use scoped enum for format in rhitextureitem example
Pick-to: 6.7
Change-Id: I2add2eb838cf7087902fbb264cef5e849435ab6e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-05 11:33:51 +01:00
Laszlo Agocs c00e6b1c40 Follow QQuickRhiItem property rename in example
The example was not updated.

Pick-to: 6.7
Change-Id: Ib9afde58b3f48639cf77848e36ee503df78bdd53
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-05 11:33:49 +01:00
Eirik Aavitsland 1ebd8ef853 quickwidget example: Avoid potential for crash on close
Widgets that had been broken out to separate top-level windows would
live on after the mainwindow was closed. Subsequent attempts to move
them back to the tab widget would crash, since the that would be
deleted by then. Fix by closing detached top-level windows on
mainwindow close.

Fixes: QTBUG-122790
Pick-to: 6.7 6.6 6.5
Change-Id: I0ae268c5e30b6563dc1556b3f79a83418cc3c703
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-29 17:56:20 +01:00
Venugopal Shivashankar cb714b1f74 Doc: Fix broken link
Fixed the following qdoc warnings:

- src/quick/items/qquickitem.cpp:[7966,7974]: (qdoc) warning: Can't link to 'QQuickControl'
- src/quick/items/context2d/qquickcontext2d.cpp:3412: (qdoc) warning: Undocumented parameter 'imageData' in Context2D::createImageData()
- src/quick/items/qquicktableview.cpp:1230: (qdoc) warning: Undocumented parameter 'cell' in TableView::modelIndex()
- examples/quick/quickshapes/weatherforecast/doc/src/weatherforecast.qdoc:[13,21,27,45,78,83,93,102,105]: (qdoc) warning: Can't link to 'Qt Quick Shapes'

Fixes: QTBUG-122230
Pick-to: 6.7
Change-Id: I4f533ed95c13a99d649568d7b773437712b5b2d1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-02-23 10:26:38 +01:00
Santhosh Kumar 8d3ed392bb Update manual tests and examples for change in default size policy
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>
2024-02-21 14:27:54 +01:00
Tim Blechmann 1dbdcf070f examples: fix unused parameter warning
Change-Id: I6ca097113fb2b3ba0a7ddde251f9068538af986c
Pick-to: 6.7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-14 02:53:46 +00:00
Paul Olav Tvete 4827f4a5d2 Weather forecast example: Clean up assets and attribution
Add licenses for third party assets and a qt_attribution.json file for
these. Also removes some assets + the mention of some assets which were
no longer used.

Pick-to: 6.7
Change-Id: Id426422b387e6d4dc63afef58c1a17b76ee92e4a
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-06 13:44:41 +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
Laszlo Agocs 4d2248f89d QQuickRhiItem API cleanup
Based on the API review. Also follow QRhiWidget for
symmetry.

Pick-to: 6.7
Change-Id: Id04a0029ebeb9326b76b485414b58c83f384c466
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-22 12:03:37 +01:00
Shawn Rutledge 86081091f9 Make PieMenu in pointer handlers example work with mouse right-click
It opens instantly with right-click; whereas it animates open with
a finger or stylus, to avoid accidental activation, as before.

Pick-to: 6.5 6.6 6.7
Change-Id: I6f530fb6da67c735fe3aae4545c8040f49e8dc05
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-17 18:25:31 -07:00
Jaishree Vyas 486cc33ce5 Doc: Create separate Graphics and Multimedia example categories
Fixes: QTBUG-117884
Pick-to: 6.6 6.7
Change-Id: Ib0bb6217c29795fe50efdf827aa9902bbd572032
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-01-17 15:36:27 +01:00
Shawn Rutledge c5e78dd6a9 PieMenu in pointer handlers example: set preferredRendererType
We need antialiasing for those menu sector shapes to look good.

Pick-to: 6.7
Change-Id: I0dac2f5b65bf3e8e62387e5189d147de63ef0d7a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-01-15 13:25:12 -07:00
Alexey Edelev d276d025a8 Change the way tests and examples query the qmldir file from QML plugin targets
Use qt6_query_qml_module to get path to qmldir, but not TARGET_FILE_DIR.
This is more accurate way.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-120479
Change-Id: I4b7f7bf3b7f69c15871e400af3e7ae945a9bfdf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-01-15 21:25:12 +01:00
Eskil Abrahamsen Blomfeldt 5e8314f472 Move Qt Quick Shapes example
Usually, we have separate top-level example directories for
different modules, but since Qt Quick Shapes only had a single
example, it was categorized under examples/quick.

We now plan to add more, so to prepare for that, this sets up
the normal structure with an examples/quickshapes directory.

Pick-to: 6.7
Change-Id: I50016358b674c18bb2930459d4e0111862ddcedb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-01-06 11:19:17 +01:00
Topi Reinio dfe316ad0b Doc: Fix linking issues and missing QDoc commands
Fix multiple incorrect \l (link) command arguments that were not
captured by documentation testing in CI.

Add missing \endqml and \endcode commands to code snippets.

Convert \sa commands that are meant to be related to specific \section
commands into manual 'See also' paragraphs. Otherwise, they are listed
at the bottom of the page.

Pick-to: 6.7
Change-Id: Icf2a97f63b8b8cdec2d9398448d28759dabdb06b
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2024-01-06 05:50:39 +00:00
Shawn Rutledge f719ee6408 Avoid crashing in the quickwidgets example after closing the subwindow
Closing the window deletes m_quickWidget; so we disable the menu items
for grabbing from it, because those cannot work. Also add asserts.

Fixes: QTBUG-120296
Pick-to: 5.15 6.2 6.5 6.6 6.7
Change-Id: I68154c2d1e4553c771815e29cbe3b095d85893f1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-05 22:50:35 -07:00
Tor Arne Vestbø f8ba365128 examples: Increase hit area of LauncherList buttons; simplify
Pick-to: 6.5 6.6 6.7
Change-Id: Ife040f9c7e01fd8b8ce80595c2179d6b78648c6e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-12-12 16:44:45 -07:00
Kai Köhne f3f3de6c38 Doc: Move Flipable, Dial Control example to UI Components category
Arguably fits better than Graphics & Multimedia.

Pick-to: 6.6 6.7
Change-Id: I2604d5f43621a73ad28d01532e6ad8ec121a2e29
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-12-11 17:39:50 +00:00
Fabian Kosmale 6dd97d29ea embeddedinwidgets: Use modern loadFromModule API
Replaces 4f4a915ded

Fixes: QTBUG-119318
Change-Id: I3c508a8b5b7f060cdb2b0eac087c24dab0f552e2
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-12-06 09:48:12 +01:00
Matthias Rauter fc5c668e55 Update Responsive Layouts Example
Fixes: QTBUG-119388
Change-Id: I66c7bf0e0aaba13a04b9cc7e6f042ded47e0b0b1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-12-03 21:13:19 +00:00
Andreas Eliasson 39793d56e0 Doc: Add CMake section to Scene Graph example
The current page only mentions qmake. Let's add a CMake section.
Also, make minor grammatical fixes.

Fixes: QTBUG-118802
Pick-to: 6.6 6.5
Change-Id: I311084c72f609a72ef5716964cd6c7c28fa64208
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-12-01 09:24:46 +00:00
Shawn Rutledge 7317a898c5 Change Cumquat to Kumquat in example
Cumquat is Australian English apparently, and looks vaguely dirty to
the rest of us.  https://en.wikipedia.org/wiki/Kumquat

Change-Id: Iee3f97f7bda526791fc7ec07395152efff5e116f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-11-29 08:49:56 -07:00
Shawn Rutledge a2f1df4d3d doc: Mention the Draggable Selection example
As long as we are not deprecating Package, we should keep showing how to
use it the way that the docs already describe: to aggregate Items by
giving the selection a name.

Also a drive-by grammar correction.

Change-Id: I373269d5e2e103ca83b724e3a553c37a60bafbde
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-11-29 08:49:56 -07:00
Lucie Gérard 8dc2e3daf0 Move undocumented quick examples to manual tests
- maskedmousearea ought to be redone with input handlers
- delegatechooser needs a realistic use case, not so ugly
- itemparticle hasn't been in working condition for some time,
  due to its use of flickr API
- keep FlickrRssModel only in manual tests (broken for now)
- remove bogus copies of flipable example files from the
  delegatemodel example which were added in
  1fef24732b
- copy shared components that examples tend to depend on
  into a shared directory for manual tests

Task-number: QTBUG-88470
Task-number: QTBUG-119117
Change-Id: Ide1918f5e1b6fcc3efd939825892bfd270cef586
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-11-28 17:57:05 -07:00
Tor Arne Vestbø 4f4a915ded Fix embeddedinwidgets resource prefix in qmake project
Pick-to: 6.6 6.5
Change-Id: I151cb5dce9dfbed9914bce09397a21cd704ffe0c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-11-24 23:33:41 +01:00
Laszlo Agocs d70b847f77 Fix corrupt rendering when toggling rendernode-based items
Meaning the toggling of visibility. Having a QSGRenderNode come and
go in the scenegraph leads to visual problems, in case the adding
and removal of the node toggles the m_forceNoUseDepthBuffer flag,
which in turn makes useDepthBuffer() return a different value
than before (so disables and then enables doing the opaque
pass in the renderer). Changing this value needs a full rebuild
of the render lists. When adding a node, this is done (regardless
of toggling the flag). When removing, it was not done at all.
Now we do it when resetting the no-Z flag back to false.

Add a button to the customrendernode example to toggle visibility
since this is useful for example's purposes anyways. However, this
on its own is not sufficient to reproduce the issue. For that,
the DepthAwareRendering flag needs to be removed from the
QSGRenderNode subclass.

Pick-to: 6.6 6.5
Fixes: QTBUG-119160
Change-Id: I232354d88f5a4fe5f9f2d6102d0d5439d92782fb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-11-24 18:34:03 +01:00
Shawn Rutledge 8f6809681e Disable TapHandler.longPressed signal if longPressThreshold == 0
There needs to be a way to disable the long-press feature, because it's
exclusive: if we emit longPressed(), we do not emit tapped(). But we
should also be able to accommodate slow users who pause for too long
unintentionally, or while simply observing the behavior.

Also clarify that resetting longPressThreshold reverts to the default.
Add more exhaustive test coverage, verify that longPressed
and tapped are mutually exclusive, and verify the effects of
violating the gesturePolicy.

Change longPressThreshold on LauncherList's back button so that it
always triggers, regardless whether the user pauses on it for a while.

[ChangeLog][QtQuick][Event Handlers] TapHandler.longPressThreshold
can now be set to 0 to disable its press-and-hold feature, and can be
reset to undefined to restore the platform default.

Fixes: QTBUG-119132
Task-number: QTBUG-105810
Pick-to: 6.5 6.6
Change-Id: Id5fd7e51c70fdb0cb6c4beb5615717a222aec871
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-17 07:28:57 -07:00
Shawn Rutledge 1b166c87d0 Make TapHandler longPressed/tapped exclusive and reliable; fix example
The back button in the examples' LauncherList.qml has been flaky.
As described in the docs, a TapHandler used to implement a Button
should have `gesturePolicy: TapHandler.ReleaseWithinBounds` to get
the common behavior that you can drag out of the button to cancel
the click, and you can also drag back into the button to change your
mind and let it click after all. But when trying to test this behavior,
another problem became evident: if you spend a longer time than
longPressThreshold for the whole gesture, then at the time of release
you could see the debug output "long press threshold exceeded" and the
tapped signal was not emitted. Our intention was that if you are
dragging around, the TapHandler is not eligible to emit the longPressed
signal; it follows that it should not become ineligible to emit tapped,
either (tapped can be emitted if other constraints are satisfied).
The intention of the ReleaseWithinBounds policy is that it doesn't
matter how much you drag, as long as the point is within the bounds
of the parent at the time of release.

So we begin keeping track of whether we have actually emitted the
longPressed signal, rather than merely looking at the time difference.

This changed behavior in tst_qquickdeliveryagent::passiveGrabberOrder:
1 second is more than enough time for long press with the default
longPressThreshold, and now the tapped signals are no longer emitted
after longPressed. So we just wait for pressed state rather than
waiting so long. qWaits in tests are best avoided anyway (although
I think the intention in 152e12dc22
might have been to wait long enough to ensure that nothing undesired
would occur, rather than waiting for something specific to occur).

Task-number: QTBUG-65012
Task-number: QTBUG-105810
Pick-to: 6.5 6.6
Change-Id: If6a86d955e19810cb06de659f5e39b50a72fa762
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-11-17 07:28:57 -07:00
Laszlo Agocs fa09df7e1a Add doc page for the threadedanimation example
Change-Id: I8907c8532bf7abdc573d2e878374e3f26618f8d9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-17 15:28:57 +01:00
Eskil Abrahamsen Blomfeldt 85e65e101b Add license headers to shader source
Pick-to: 5.15 6.2 6.5 6.6
Change-Id: I007eaddf0a3a9e7e6242d4e02b487fa0806c96a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-10-30 10:30:37 +02:00
Paul Olav Tvete c1a0cb5a3a Add zooming to the shapes example
Pick-to: 6.6
Change-Id: If10ffe77b5e61f605f9f735c51f639c422844b2d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-10-03 10:10:41 +02:00
Laszlo Agocs a903c2577b rhitextureitem example: Remove QuickPrivate dependency
In the dev (6.7) version this is definitely not needed.
Not sure how it got there.

Change-Id: Iba0c68aef0fc19c92565908d622e4f8827fe72c9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-10-02 11:12:52 +02:00
Shawn Rutledge 251fdf01a6 Rename shapes example qml files according to what they demonstrate
Amends 270a6f9bba

Fixes: QTBUG-115485
Pick-to: 6.2 6.5 6.6 6.6.0
Change-Id: Id77b4dd8ce83175ebe29d24bf987572d5e9069d7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-09-27 21:16:05 +02:00
Jaishree Vyas 46fc095ae4 Doc: Add example categories for qtquick
Task-number: QTBUG-116334
Pick-to: 6.5 6.6
Change-Id: I993b6157c3ef8a69e4e218d62596b5219ab4b34b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-09-26 14:08:47 +02:00
Laszlo Agocs bcda7aa6e4 Show item size in rhitextureitem example
To make the logical window/item size vs. reality (texture sizes
in pixels) difference obvious immediately.

Also change the slider max value to 2048 to allow exercising up to
2048x2048 textures.

Also clean up the texture format label.

Change-Id: I27e0d1fe99fa2a32f55176612ac1ca65c9045a4d
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
2023-09-25 11:01:17 +02:00
Laszlo Agocs aeb3bd235a Clean up customrendernode example
Make it more consistent with other scenegraph examples, and make it
more compact, in particular when it comes to handling the QRhi
resources (smart pointers are quite useful in this case since they
help dropping a bunch of lines)

Expand the docs.

Pick-to: 6.6 6.6.0
Change-Id: I97bceca7759db9738d34f0fbf7eb29b0ae6e4c0f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-09-25 09:01:17 +00:00