Use qt6_query_qml_module to get path to qmldir, but not TARGET_FILE_DIR.
This is more accurate way.
Pick-to: 6.5
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>
(cherry picked from commit d276d025a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5e60f6d141)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
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
Change-Id: I6f530fb6da67c735fe3aae4545c8040f49e8dc05
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 86081091f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 08b00cf7e3)
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: 6.5 6.2 5.15
Change-Id: I68154c2d1e4553c771815e29cbe3b095d85893f1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f719ee6408)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a49d309b4a)
The current page only mentions qmake. Let's add a CMake section.
Also, make minor grammatical fixes.
Fixes: QTBUG-118802
Pick-to: 6.5
Change-Id: I311084c72f609a72ef5716964cd6c7c28fa64208
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 39793d56e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.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>
(cherry picked from commit d70b847f77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: Id5fd7e51c70fdb0cb6c4beb5615717a222aec871
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 8f6809681e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: If6a86d955e19810cb06de659f5e39b50a72fa762
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 1b166c87d0)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
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.0
Change-Id: I97bceca7759db9738d34f0fbf7eb29b0ae6e4c0f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
(cherry picked from commit aeb3bd235a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use FrameAnimation instead of Timer and double the amount of samples
to make the example smoother.
Change-Id: I6f5bb1414fd7532e16aeb25f886879828ce29854
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit 75a33aceab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add mobile example category tags for the chosen examples.
Add for the ones that work best for both Android and iOS.
Remove from the ones that do not work for both (at least yet).
Added, as verified on Android
-scenegraph openglunderqml
-qtquickcontrols-contactlist
-qtquickcontrols-gallery
-qtquickcontrols-wearable
Removed (for now), as not verified yet on Android
-qtquickcontrols-todolist
Fixes: QTBUG-116780
Change-Id: I7f22329ec93dedaa63df34bb55dd67d14ffe5c1d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 628659f759)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The threading example used a LauncherList to combine
two different but related examples into one.
I've now separated both into a shared directory called
'threading'
Change-Id: Iee8898e61adcf69dc67157a1eff5f6ac019a39ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 38373b81f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added example category and also fixed one copy-paste mistake in Vulkan Texture Import.
Task-number: QTBUG-116205
Change-Id: I96692f214849596e9555c635d9996d9b884c5cab
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit e421c21c3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Right now requesting d3d12 via QSG_RHI_BACKEND or the C++
API maps to the Null backend of QRhi. That is not ideal.
QRhiWidget has this logic, but the already existing
QQuickWidget was not yet adjusted in 6.6 it seems.
Change-Id: I12301e815d525c14584b01dcd0caa787d1c79ad0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 76ae3dd783)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CurveRenderer has built-in antialiasing supports, so compare it here to
MSAA and SSAA.
Task-number: QTBUG-104122
Change-Id: I207ab770cae052b195e9da8802dc594a91ce713b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit eb6af63f61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The "Scene Graph - Vulkan Under QML" example includes snippets of code
from the example source file(s) using a combination of the `\skipto` and
`\printto` QDoc commands. The former skips content until the line that
contains the argument passed to the command
(here, "class VulkanSquircle"). The latter prints lines up to, but not
including, the line that contains the argument passed to the command
(here, "public"). I suspect the author's intention was for QDoc to
output lines from the start of the class declaration until the public
access specifier in the member specification of the class. However, the
first instance of `public` QDoc encounters is the base-specifier of the
derived class, which is on the same line as the argument to the
`\skipto` command. Hence, there's nothing for QDoc to output.
Modifying the argument to include the colon that indicates the keyword
is for member-declarations ensures QDoc generates output as expected.
Fixes: QTBUG-116304
Change-Id: Ibfc17fbacd10f902fc2a5f57873fe0990571535e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
(cherry picked from commit 9e3b681460)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We have two examples that are both showcasing different drag and drop
features.
Might as well only have one.
Change-Id: I9d984f723f42aaf39c5632e58fc376ad0df18acb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 38d6028ad1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The patch makes the following changes to the example:
- It fixes all qmllint warnings.
- It translates all user-facing strings.
- It reorders some properties.
- It removes the Loaders in layoutdirection.qml
- It also does some other things,
like removing unused lines of code, etc.
Change-Id: I798db60a2bf2d87c64b68947588585d10ba4015d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit dba7d84843)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These are getting long in the tooth, but multiflame and corkboards seem
worthwhile to update to use Pointer Handlers (as we could have done
sometime during the last 5 years or so).
The qrc prefix seems to have changed: let's get the qmake build
working again.
The multiflame example is mostly rewritten:
- all in one file, which can run standalone
- only one ParticleSystem instance (which hopefully is more efficient)
- using an inline component
- less boilerplate per component instance (only one property for
ColoredEmitter, which is both its color and its group name)
- less-extreme, more fire-like colors
The version of corkboards in Qt Quick 3D was already updated (and then
removed for unrelated reasons); now we have the fixes from
0227fcdf3ea82efee3005d99fd1019410a7f5789
BearWhack has nice graphics, but doesn't seem like a very nice use of
multi-touch, so it's demoted to the touch manual test for now.
The simple Flickable use cases seem underwhelming nowadays too, and
we have snippets as simple as those.
Replace mentions of touchinteraction for testing with pointerhandlers.
Change-Id: I4667e13e961ca6f84d3336505b3c673790babfa5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 1fc968c513)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This seems to be still a consistent naming convention for example docs.
Change-Id: I508526ec992222da1c971bc327dd9c83a21640aa
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 794b6a6ab7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The views example is an old example, which shows off many different
features related to ListView, GridView and the QML models.
Unfortunately, there are currently a few things that are broken in it.
One of those things is the FlickrRssModel, which no longer works,
because flickr changed their web API.
This patch makes some improvements, but it's unfortunately not fixing
everything.
The list of fixes are the following:
- Fix a good number of qmllint warnings. Unfortunately, there seems to
be a good number of false positives that remain unfixed.
- Use qsTr() in some places. But I've not adopted it everywhere.
- sections.qml now uses Qt Quick Controls CheckBox'es instead of a
custom component.
- Property bindings are now declared on separate lines.
Change-Id: Idfb563f4bd658dc70c1b9975549e872e7c25449e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit c4d520c200)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The following changes are applied to the example:
- All qmllint warnings are fixed.
- Tv tennis part of the example is now actually working.
- Use let/const instead of var in JS.
- Use qsTr() in a few places.
- Use strict equality operator, when it's wise to do so.
Change-Id: If0222feb942abfd0a6c9f8a8cab0ac60ced3d76e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 838472592b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When configuring the qt5 supermodule with -make examples, the
directories
examples/quick/imageresponseprovider/ImageResponseProviderCore/
examples/quick/imageprovider/ImageProviderCore/
were being created under the qt5 parent dir, instead of inside the
qtdeclarative subdirectory.
Fixes: QTBUG-113495
Change-Id: I78a3fe6e1cab97b6e7be7900d2ecb66175a68065
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c91b718637)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apparently it's always been incomplete, a relic from Nokia: there's no
means of entering the "menu" state, and nothing to detect a long-press
as the text says you can do.
On mobile platforms, the platform input method provides selection
handles; on embedded platforms, Qt Virtual Keyboard does it. So this is
generally unnecessary, but perhaps it could be revamped into a
demonstration of an alternative way to add text-selection handles.
Change-Id: I231db14e5fbb4e82e8d732153e3d3843a080b409
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 810a329983)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The LayoutItemProxy is a proxy for an arbitrary QuickItem that is
intended to be used in Layouts. This allows to position a QuickItem
in multiple layouts to build responsive layouts.
[ChangeLog][Layouts] Added LayoutItemProxy, a helper item for writing
responsive layouts.
Task-number: QTBUG-71153
Change-Id: Ief2bdbf44b3b346157ce2c71a313cc1e132f49ac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
fboitem, the OpenGL-based QQuickFramebufferObject example is now gone,
replaced by the rhitextureitem example.
It is now possible to implement a custom QQuickItem that renders into a
QRhiTexture and then draws a triangle/strip geometry textured with that
texture using just public Qt Quick APIs and the semi-public QRhi APIs.
There should be conveniences provided for this in future Qt versions,
but for the time being we provide an example how applications can do
this in Qt 6.6 already. This complements the rhiunderqml example which
shows the underlay/overlay approach, and the customrendernode example
that shows the "inline" approach with a custom QSGRenderNode. The
rhitextureitem example added here shows the third, "offscreen" approach
that goes through a texture.
The example docs are better than before but not yet complete.
To be extended separately.
Task-number: QTBUG-113331
Change-Id: I83000c08b057dd72371e2909905120dc496cb34d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This implements the Loop/Blinn algorithm for quadratic curves
as an optional backend for Qt Quick Shapes, basically distance
fields where the distance to curves are calculated in the
fragment shader.
This means cubic curves are approximated, which will give
varying results, but for many shapes (such as text) this is
efficient and means the shapes can be zoomed indefinitely
while still retaining curvature as well as anti-aliasing
working without MSAA.
Preliminary results give some frame rate improvements
compared to doing MSAA and GeometryRenderer, but the major
improvement is that you can get smooth curves at any zoom
level without re-triangulating the shape.
Note that the renderer currently does not do antialiasing
for straight lines. This would still require MSAA, but at
a lower cost than for GeometryRenderer since there are
much fewer triangles. Adding AA here as well is work in
progress.
Task-number: QTBUG-104122
Done-with: Paul Olav Tvete <paul.tvete@qt.io>
Done-with: Eirik Aavitsland <eirik.aavitsland@qt.io>
Done-with: Amr Elsayed <amr.elsayed@qt.io>
Change-Id: I6b4a1103546fbdfe760906f7a183101f8eedb9d3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
They were in a pretty good state already.
This patch simply makes some minor tweaks,
based on our own guidelines for examples.
The tweaks include, but are not limited to:
- PRIVATE linkage
- WIN32 and MACOSX_BUNDLE in qt_add_executable()
- Remove unused #include
- Use qsTr()
- Remove warnings.
Pick-to: 6.5
Change-Id: Ie4d50d4e2134b7b373bdf1ba38779d3052165286
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
And fix up the scenegraph example list on the Qt Quick example page.
Task-number: QTBUG-113331
Change-Id: Ic7b97871253d16b778f7da6088f4a9130bef2ec5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Besides following the header naming changes, make the obvious API
changes that are based on data that is already there but was hidden
previously due to not wanting anything QRhi to shine through in the
public API.
This kind of hiding is no longer needed, even if qrhi.h and similar
still cannot be included from a public header. Forward declarations
are now perfectly fine however.
Task-number: QTBUG-113331
Change-Id: I9a114082cf9218edc487df50956f5793d6b8bdb4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
- Splash assumes less, for better reuse: set visible where used,
start Timer only when visible
- no need for SystemPalette: Window and Item have palette properties
- get rid of MouseAreas
- click to set a random color
- make buttons square with Unicode "icons"
- fullscreen button has Binding on checked, to be checked regardless how
visibility is changed; onClicked is smaller
- tooltips
Pick-to: 6.5
Change-Id: Ibbc1be2a3b113e68f61c69ef695ceea8c300fd1e
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
There is no executable, so setting `WIN32_EXECUTABLE` or `MACOSX_BUNDLE`
is not necessary. I also moved the source file under
`qt6_add_qml_module`.
I feel this example is not complete, or need some more updates.
Pick-to: 6.5
Change-Id: Ic79690e241a8a8a98d35c96e1aa57dddcbc29153
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>