| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After 499828b855d125ac236917f6ed01d8f1e7d88505 if you want a MouseArea
underneath some other contents to receive propagated hover events, the
content must be inside the MouseArea, not a sibling. HoverHandler still
does not have this restriction (handlers cannot have items as children,
and the handler is not considered a sibling: it's an event-handling
facet added to the item in which it's declared).
Change-Id: I5ac31d982e429ac002cb0bd7ae9c071ab927032b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 864dade139242f8ef8bb208d899fa8264cfb91f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
They were renamed in 51b7425329e0fa221c319e8d75595c19f664aedb
Task-number: QTBUG-15160
Change-Id: If30f69d47adf391d2d1c795caaf2bbe15f6bc32a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 771b31c2355b9d3d6bc5673a0f076202985bdb4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scaled to fit whole screen on android.
Replaced items with Qt Module names.
Randomized colors.
Added scrollbar.
Task-number: QTBUG-95438
Change-Id: I1686aff4d4770d0d34399f20301c8fc393b8d778
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9dcd908fb53e65d5dc6e8acc61e883b7b715dc92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QSGRendererInterface::OpenGLRhi is only an (undocumented) alias to
...::OpenGL, so let's use that instead.
Amends 0b2311a62b25c
Change-Id: I4acdd39dc1d9b75bed5c474667a43b4ad86e7f47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit e2138561df3562c19000af24d43659090c19167a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove # generated from xyz.pro comment from pro2cmake
- Remove "# special case" markers for pro2cmake
- Remove automatic use of CMAKE_AUTORCC
- Only opt into CMAKE_AUTOUIC if .ui files are involved
- Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR
- Combine multiple find_package(Qt6 ... calls)
- use REQUIRED COMPONENTS
- sort components alphabetically
- Fix wrong indentations
- Use (only) one empty line after multi-line commands
Change-Id: I0d6bfb06c4b25e9921d3d2bf31d977150f12b31b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 9d82f4bff8520c3f6db7790d9044c3dfc5cc84c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Reparenting the tile doesn't seem to be needed; and behavior changed
somehow in Qt 6.
Task-number: QTBUG-99436
Change-Id: If860d62260a7904718eb33b857b339bc6c5557a8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 092b58246087d4eee08b0fe8d682f95b40497b6b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-90820
Change-Id: I7fab73f63a22901ab2d4d4e57b5a25b433100de5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 2f45a9c2b9f3a136f6933b6faa8e223a634b28a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Amends e17bfffc075202ff9ee8fba0f378f95037514740 and
8503f884bbdb50c4bebc8f8a9fce05275b0612b1 : all qml files need to be
listed in CMakeLists.txt, we need to keep qml.qrc updated too, and
we decided to keep the qmake project files.
Change-Id: Idaa4bbddabd59e79a0ae3b907319c6843d8a026a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml][Instantiator] Instantiator now avoids re-assigning a
delegate object's parent to itself if it was already set; thus, you can
now declare a parent assignment.
Task-number: QTBUG-64546
Task-number: QTBUG-84730
Change-Id: I7d95fa76e71c363b4cb5b7a512c2e984488c8af4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
MouseFeedbackSprite now shows a mouse wheel animating in the same
direction as the physical mouse wheel is being rotated.
Change-Id: I08709ead3b85065723d2320d17d49adb51a00f92
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As with WheelHandler, sometimes users want to let the hover events
propagate (which has been the default all along), but sometimes it's not
appropriate to allow parents of nested items to show hover feedback.
[ChangeLog][QtQuick][HoverHandler] HoverHandler now has a property
called blocking, which is false by default; but if set to true, it
prevents hover events from propagating to items "under" this handler's
parent, and their HoverHandlers.
Task-number: QTBUG-85926
Change-Id: I26f89482e294c7a6b30a55a7e23ac444a0d1ac7f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
reused_dir_targets takes a list of targets, not directories, so provide
that one. Amends 953c1cf394613fd5977aa4068f45d9d4b6d39662
Fixes: QTBUG-98468
Change-Id: I44e811ff738c5a51845c4829e1e6928e5f2f06f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 00c352c4d4b61f8c7a6243768bc5375c3dca3e76)
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
All targets using the "shared" approach need special handling in
toplevel builds to ensure that AUTOMOC works.
Amends aa4897e017c027c935cd349450bf787393ce5552.
Fixes: QTBUG-98468
Change-Id: Ic0a6ee0ab43190e359ad7cfb7e7634d393ff0b03
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 953c1cf394613fd5977aa4068f45d9d4b6d39662)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a touchscreen, right-clicking is not directly possible; so sometimes
a long-press gesture is used as a substitute. The next thing a UI
designer would want would then be a way of showing feedback that a
long-press is in progress, rather than simply waiting for the long-press
to occur and then surprising the user with some instant action.
For example, a menu might begin to open as the user holds down the
touchpoint; but before the long-press gesture is complete, the user can
simply release, to cancel the gesture and close the menu. The timeHeld
property could drive the animation, to avoid needing a separate
animation type; in fact the reason timeHeld exists is to make it easy
to emulate this sort of touch-press animation, like one that occurs on
touchscreens since Windows 7.
But after the menu is open, the user would probably expect to be able to
drag the finger to a menu item and release, to select the menu item. For
such a purpose, the existing gesture policies weren't very useful: each
of them resets the timeHeld property if the user drags beyond the drag
threshold; so if the user expects to drag and release over a menu item,
then the timeHeld property cannot drive the menu-opening animation,
because the menu would disappear as soon as the user drags a little.
So it makes more sense to have a gesturePolicy that acts like
WithinBounds, but also applies the same policy to the timeHeld property
and the longPressed signal. We don't care about the drag threshold:
if the user is holding down a finger, it's considered to be a
long-press-in-progress, regardless of how far it has moved since press
(as long as it stays within the parent's bounds).
An example of such a menu is added. The menu must have TapHandler as
its root object, because it reacts to press-and-drag within some larger
item, larger than the menu itself. For example such a menu could be
used in a canvas-like application (drawing, diagramming, dragging things
like photos or file icons, or something like that): dragging items on
the canvas is possible, but long-pressing anywhere will open a context
menu. But in this example so far, only the menu is implemented.
It's a pie menu, because those are particularly touch-friendly; but
perhaps for the mouse, a conventional context menu would be used.
[ChangeLog][QtQuick][Event Handlers] TapHandler now has one more
gesturePolicy value: DragWithinBounds; it is similar to WithinBounds,
except that timeHeld is not reset during dragging, and the longPressed
signal can be emitted regardless of the drag threshold. This is useful
for implementing press-drag-release components such as menus, while
using timeHeld to directly drive an "opening" animation.
Change-Id: I298f8b1ad8f8d7d3c241ef4fdd68e7ec8d8b5bdd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
Complements 23dbe3d6e0d3338812ad9f614028a6fdc5a54090.
Pick-to: 6.2
Change-Id: Ic1bda49a888b0580ac483d650b879a9ae843129b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Updating the CMakeLists.txt files in the d3d11 and opengl version of
the example to use the new qt_add_qml_module() function instead of the
old qt_add_resources()
Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: Ida43e4b0c875951a85d754b3a96f88366b580e24
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The models directory contains 3 subdirectories with an example project
in each.
This patch updates the CMakeLists.txt files to use qt_add_qml_module()
instead of the old qt_add_resources().
In order to achieve intercompatibility with both cmake and qmake, I had
to do some slight modifications to both the .qrc files and the url path
used to set the source to the QQuickView.
Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I13d1c01a0eda181823f394bc2a4259ce98abd4f8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building the TextBalloon in isolation doesn't make any sense.
Its purpose is to implement a delegate, for the painteditem example to
use, and should therefore only be built as part of the painteditem
project.
To build the example, cmake should be invoked with
examples/quick/customitems/painteditem/CMakeLists.txt as its source
path.
The CMakeLists.txt in examples/quick/customitems/painteditem/TextBalloon
should only be used from another CMakeLists.txt file via the
add_subdirectory() command. If invoked directly it makes sense to print
an error message and stop processing.
Task-number: QTBUG-96806
Pick-to: 6.2
Change-Id: I1ebd2157790afbf7307498a4fb64049794ae6c5b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
We want to use the new cmake api, rather than qt6_add_resources()
Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I567aec77b963adce03fb683c244d758880891ce5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We want to use the new cmake api instead of qt6_add_resources()
The file structure has also been flattened a bit.
Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I1651d25e2902bf6932b78c2224ee4ffe454b658d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thing patch updates the CMakeLists.txt file to use qt_add_qml_module()
instead of qt6_add_resource().
Additionally, it changes a signal handler, which was previously a plain
statement, into a js function, which is the preferred way to write signal
handlers.
Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I1b08dcd3eae370d78587aa3d37d9456437b54b42
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The particles directory contains 5 different examples
and a shared directory with some images files.
This patch changes the examples to use qt_add_qml_module()
in the CMakeLists.txt project files, and changes the .qrc
files to directory reference the files needed by the individual
projects, which removes the need for images.qrc.
(The .pro files still reference the shared.qrc file)
The "content" directories located in the different example
projects, have been removed, and the containing files have simply
been moved to the parent directories instead.
Some unused files in the itemparticle example have also been
deleted. This example looks very outdated and should ideally
be improved, or perhaps simply removed, but I decided to leave
it for now.
Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: If05986b4347814715bca50b8d3f6a5cddbf9ced4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Also, prefer the multi-line syntax over ';'-separated bindings for
readability.
Change-Id: I3d6eb854e514ee257ca83773a11e6e9e10770bff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Prevent accidental inclusion of windows.h through d3d11_1.h where
max/min are defined as macro. That causes the subtle error elsewhere
within the example
Change-Id: I527c53ecbc82204a1f087719f5b0b4736d8c3447
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a color is not the rgb format, when QColor::red() QColor::blue()
QColor::green() is used continuously to obtain the values of different
channels, three times color conversions will occur. Therefore, use
QColor::toRgb() before that to ensure that only one conversion is
performed at most. Not only rgb, the conversion of other formats is the
same.
Change-Id: Ia969e1ca6f1524ad5d7e8dec915bcbc407875c66
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2 5.15
Change-Id: I5a39ba9361503cd5d7ce2e6da59d7807d540bee5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Many of these are portable to Qt 5; but we don't need the version
numbers in Qt 6, and the components that use "palette" refer to
Item.palette, which was added in Qt 6.
Pick-to: 6.2
Change-Id: Ic799fba5dd66db51a8808c52dce01d27c6da62bb
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
TapHandlerButton is not in this example: we just call it Button.
Amends 8503f884bbdb50c4bebc8f8a9fce05275b0612b1
Pick-to: 6.2
Change-Id: I49bc6081f05642cd938a257c14c10497bfafb8a8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-97466
Pick-to: 6.2
Change-Id: I9bb0b79b12cbd43209f56137bbdb67ca2457ca6c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
Replaced in most common patterns.
Change-Id: Idcaff1f2e915f29922702d3600a2e5f1e2418a7a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ibe0ef16609a704042b964b4c29078c462820e602
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This commit updates the drag and drop example to use qt_add_qml_module()
in its CMakeLists.txt file.
Pick-to: 6.2
Change-Id: I47fd28a1a114fe70986f73d4f2d87265255652a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sliders adjust maximumFlickVelocity and flickDeceleration.
Also in the shared Slider: try harder to end up with value being
the same as init, after initialization, by making the range of movement
divisible by more numbers, by default. 180 is highly divisible, and
keeps the default Slider size reasonable. You can still override the
size of the Slider arbitrarily, though.
Task-number: QTBUG-97055
Change-Id: I6fb41ccb87e401a747d5a8add3100053a06d9d88
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Amends edc4357ae4893dd952ce1c07b180b4b334047606
Pick-to: 6.2
Task-number: QTBUG-96805
Change-Id: Iedbf372cd94b1b04db55685a5d05daca491200fe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We deprecated qmlscene in a9c93e2716a097c637515aded49a3308e257204b
so we should stop recommending it in docs, too.
Task-number: QTBUG-53219
Pick-to: 6.2
Change-Id: Ic729624a8ef849bd13f38087e20b5a410c5c5756
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copy the qml plugin into the macOS app bundle just like we do for the
examples that use the 'shared' project using the new
add_qml_module_to_macos_app_bundle helper function.
Amends 79cae5f6522bc259caa27b98031bfe84ef936744
Pick-to: 6.2
Fixes: QTBUG-96805
Change-Id: Ib22131a15f0cd06a7888ec991f5ec9f79045d202
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the logic of bundle_shared into a more reusable
add_qml_module_to_macos_app_bundle function that can be used in
QtQuick examples that need to bundle the qml plugin on macOS, but don't
use the 'shared' qml module plugin.
The new function is placed in a QtBundleQmlModuleForMacOS.cmake file
which can be included separately from the shared/CMakeLists.txt
project.
Amends 633a85cd39cdd294283439972cffebcff32ac0cb
Pick-to: 6.2
Task-number: QTBUG-96805
Change-Id: Iebb3f4734b9a6bd8a8316bf5ae01d9740c442645
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't pre-create a qml module backing library, don't link to it
directly and instead rely on regular qml plugin loading.
This avoids undefined linker errors.
Amends 79cae5f6522bc259caa27b98031bfe84ef936744
Pick-to: 6.2
Fixes: QTBUG-96805
Change-Id: I77acd086257e27e1933e9b36d7f0212765afceb3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using a static Qt, linking of examples that use the 'shared' Qml
module would fail with the following error
Undefined symbols for architecture x86_64:
"qt_static_plugin_sharedPlugin()", referenced from:
StaticsharedPluginPluginInstance::StaticsharedPluginPluginInstance()
in window_shared_init.cpp.o
This happened because the 'shared' project pre-created its
plugin target with qt_add_library instead of qt_add_plugin.
qt_add_plugin passes an additional QT_STATICPLUGIN compile definition
when compiling the moc'ed file to ensure that the QT_MOC_EXPORT_PLUGIN
macro creates a qt_plugin_instance_PLUGIN_NAME symbol.
Unfortunately we can't use qt_add_plugin for shared Qt builds, because
some of the projects link directly against the plugin target and it's
not possible to link against a MODULE_LIBRARY target which
qt_add_plugin creates in shared Qt build.
We could try to conditionally switch between using qt_add_library for
a shared Qt build and qt_add_plugin for a static Qt build, but that
further complicates the build system code because it requires
specifying a class name and plugin type explicitly.
Remove the direct linkage against the libraries in the examples and
instead rely on plugin loading.
This simplifies the logic of not having to pre-create a target.
Amends 7b6eea37aeea55cdf1bcb1fd9c3091d6753f95e8
Pick-to: 6.2
Fixes: QTBUG-96805
Change-Id: I5b2f3992ccda29b59f1e99748005381c73daca69
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure the shared qml module is built before it is bundled into the
app's bundle dir on macOS.
Pick-to: 6.2
Change-Id: I0b93fc54d1caa86070335347f5d2735eafe6819a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Text is rendered top-to-bottom: QQuickTextNode::addTextLayout()
iterates lines of text. Now it first maps the window size() rectangle
into the Text item's coordinate system, and treats that as the viewport:
lines whose y coordinates fall outside are omitted.
This saves a huge amount of time and memory when the text is large.
So Flickable { Text { } } can actually be used in an ebook reader now,
for example.
QQuickItemPrivate::transformChanged(parent) is now used to inform
all children when a parent moves; so e.g. when a content item is
moved inside a "viewport" item (like a Flickable, or any other item
that is being used as a clipping viewport or just as a holder),
all children of the content item will be notified; and QQuickTextPrivate
uses this occasion to mark itself dirty so that the updatePaintNode()
will be called again. This happens directly after the actual movement:
QQuickTextPrivate::transformChanged qquicktext.cpp 2990
QQuickItemPrivate::transformChanged qquickitem.cpp 5200
QQuickItemPrivate::dirty qquickitem.cpp 6339
QQuickItem::setY qquickitem.cpp 6830
QQuickFlickablePrivate::setViewportY qquickflickable.cpp 1800
Task-number: QTBUG-60491
Task-number: QTBUG-90734
Change-Id: I152d23caa725f194a186a604fbc8d0c07f597b16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: Icaf1bcda4a996cc3348911c87e43c4af2a246d73
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As long as we had the funcs array, it would have been nice to be able to
directly get an index from whatever "tool" is selected. For example,
TabBar has currentIndex; but TabBar is otherwise not a great fit here.
But the funcs array wasn't so elegant anyway.
So that prompts switching to the known OO design pattern in which
drawing tools are objects containing functions that "do" the drawing, so
that there's no conditional dispatch: just ask the tool to handle each
mouse state change. I.e. here the DragHandler on the canvas uses the
tool's shapeType Component to create the shape, but the DragHandler
doesn't have to care which shape it is.
Handles for moving the shapes' control points are also shape-agnostic:
- a handle is a sort of template taking the path x and y properties to
read and write
- the handle initializes its position from those properties
- the DragHandler inside gets to do what it does best: just drag the
handle, nothing else (instead of needing to script the movement of
both the handle and the control point, we don't script either one)
- declarative bindings on the handle's position update the path
properties whenever the handle moves
And some styling:
- Switch looks better than Button for toggling
- use palette colors so that it looks good in dark mode too
- fix handle colors getting stuck on yellow
- borders on handles (yellow on white makes it hard to see the edge otherwise)
- reorder curve types by mathematical order (line, quadratic, cubic)
Pick-to: 6.2
Change-Id: Iefd980f428601840deb55370aad9256748855f07
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They were always meant to be examples eventually. Now they will be used
for an example of how to implement custom controls using only basic
items and handlers. Some components are very similar to those in
the shared directory; but most examples will use Qt Quick Controls,
so those shared components can be removed when we no longer use them.
This example should remain as the one that shows how to build
reusable controls "from scratch".
Removed InputInspector because it's inefficient, has limited usefulness,
tends to require building the manual test to be able to run it, and
could be better built as a reusable Qt.labs component later on,
providing a model with all known devices and taking advantage of the
QPointingDevice::grabChanged signal to track the grab states rather
than polling.
Pick-to: 6.2
Change-Id: I47ab6ebb2cecab07a69cf96e546ffd0db3026a60
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each square is resized anyway in shapegallery.qml; but for the sake of
running individual examples on the command line with qml, the content
being shown should be visible. Without this fix, each item had a 0,0
size by default; but the shapes themselves have their own sizes and are
centered in the zero-size root item. But when a window is created, the
window system does not allow it to have zero size, so it expands; and
then the shape would be centered at the top-left corner, and you could
only see part of it.
Pick-to: 6.2
Change-Id: I42a537421430aea8233106353e9c2033f5bc5774
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
delegatechooser_shared also uses the shared directory, and thus needs
the workaround.
Amennds f4760b48bb994050afeffa5426671bc110cdcc8b.
Pick-to: 6.2
Change-Id: If05694c2608b0e0a86993f0f2ace7b1640d039c7
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In top level builds, qt_autogen_tools() needs to be called on any
target that enables AUTOMOC. A previous commit fixed that problem for
the qt_target_qml_sources_example target, but missed also fixing it for
the associated plugin target. Add that missed call here.
More examples that use the common "shared" quick directory have also
since been added, but the step that ensures qt_autogen_tools() was
missed. Add them to the missing step. One of the existing steps also
had a typo, which meant it wasn't handled either, so correct that as
well.
Amends 067253fb2f1aec3e03c577dd53ed2e6d903c28da
Task-number: QTBUG-96118
Task-number: QTBUG-96159
Change-Id: I2fae5d9a1fd474b22e01ec51d5b1030237f3e08f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 215dea1bfc113b792cb167e0359d36f9250e3d21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Examples using the "shared" pattern need to be recorded in the list in
examples/quick/CMakeLists.txt, so that we do the necessary AUTOMOC
handling for them in a top level build. For details, see the commit
which introduced that list.
Amends 34bc389543c37b8439c9c0b48f471649b6529868.
Pick-to: 6.2
Change-Id: I6945b0c8445fe436da259dd240342e1c3b5cbf26
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
|
|
|
|
|
|
|
|
| |
Changing the CMakeLists.txt file to use qt_add_qml_module().
Pick-to: 6.2
Change-Id: Icafe9359494136af6d5f3befaa9e767ab12deb30
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix changes the CMakeLists.txt file to use qt_add_qml_module().
It also updates copyright headers and changes import statements to
remove version numbers. This causes the example to use qt quick
controls 2, rather than qt quick controls 1, which is obsolete, and
should no longer be used by any of our examples.
Pick-to: 6.2
Change-Id: I1e40990b3a184c73b67a2ab04b4ec555774b8a1b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|