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>
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>
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>
* 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>
- 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>
- 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>
- 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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>