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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
Use FrameAnimation instead of Timer and double the amount of samples
to make the example smoother.
Pick-to: 6.6
Change-Id: I6f5bb1414fd7532e16aeb25f886879828ce29854
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* src/qml/jsapi/qjsengine.cpp:
(qdoc) warning: Can't link to 'qvariant_cast()'
* src/quick/items/qquickrhiitem.cpp:
(qdoc) warning: Undocumented parameter 'item' in
QQuickRhiItemRenderer::synchronize()
(qdoc) warning: Can't link to 'msaaColorBuffer()'
(qdoc) warning: Can't link to 'resolveTexture()'
* src/quick/scenegraph/util/qsgtextnode.cpp:
(qdoc) warning: No such enum item 'Text.NativeRendering' in
QSGTextNode::RenderType
(qdoc) warning: Undocumented parameter 'color' in
QSGTextNode::setColor()
(qdoc) warning: Undocumented parameter 'color' in
QSGTextNode::setSelectionColor()
(qdoc) warning: Undocumented parameter 'viewport' in
QSGTextNode::setViewport()
* examples/quick/rendercontrol/rendercontrol_rhi/doc/src/
rendercontrol_rhi.qdoc:
(qdoc) warning: Can't link to 'QWidget-based'
(qdoc) warning: Can't link to 'QAnimationDriver'
Mark all documentation modules in qtdeclarative as free of warnings.
Change-Id: I97cc059701c351b53cdeeb5fc2feff923c5a76a8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
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
Pick-to: 6.6
Change-Id: I7f22329ec93dedaa63df34bb55dd67d14ffe5c1d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Added example category and also fixed one copy-paste mistake in Vulkan Texture Import.
Task-number: QTBUG-116205
Pick-to: 6.5 6.6
Change-Id: I96692f214849596e9555c635d9996d9b884c5cab
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
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.
Pick-to: 6.6
Change-Id: I12301e815d525c14584b01dcd0caa787d1c79ad0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
CurveRenderer has built-in antialiasing supports, so compare it here to
MSAA and SSAA.
Task-number: QTBUG-104122
Pick-to: 6.6
Change-Id: I207ab770cae052b195e9da8802dc594a91ce713b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
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
Pick-to: 6.6 6.5
Change-Id: Ibfc17fbacd10f902fc2a5f57873fe0990571535e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Try to follow the QRhiWidget API in most ways.
Implies that the rhitextureitem example is repurposed
to be the QQuickRhiItem example.
The qquickitemrhiintegration autotest is repurposed as
the qquickrhiitem autotest.
Task-number: QTBUG-113331
Change-Id: I045d87f82ace07c8571c72c78e193cd5201cad69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
We have two examples that are both showcasing different drag and drop
features.
Might as well only have one.
Pick-to: 6.6
Change-Id: I9d984f723f42aaf39c5632e58fc376ad0df18acb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
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'
Pick-to: 6.6
Change-Id: Iee8898e61adcf69dc67157a1eff5f6ac019a39ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
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.
Pick-to: 6.5 6.6
Change-Id: I798db60a2bf2d87c64b68947588585d10ba4015d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
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.
Pick-to: 6.6
Change-Id: I4667e13e961ca6f84d3336505b3c673790babfa5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This seems to be still a consistent naming convention for example docs.
Pick-to: 6.6
Change-Id: I508526ec992222da1c971bc327dd9c83a21640aa
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
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.
Pick-to: 6.6
Change-Id: Idfb563f4bd658dc70c1b9975549e872e7c25449e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
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.
Pick-to: 6.6 6.5
Change-Id: If0222feb942abfd0a6c9f8a8cab0ac60ced3d76e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
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
Pick-to: 6.5 6.6
Change-Id: I78a3fe6e1cab97b6e7be7900d2ecb66175a68065
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>