The qmake and qmlproject files are adapted to use the "shared" module,
too.
Pick-to: 6.2
Change-Id: I5fc4895416357ba202528b155581b1b5a880a68d
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The shared code becomes its own module. Due to the ${PROJECT_NAME} trick
it should be possible to include it multiple times, in different
examples.
Pick-to: 6.2
Change-Id: I78cc3211f67fae9a713320fae4041898e6a397ed
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Replacing a custom made slider component with a qqc2 slider.
Task-number: QTBUG-95738
Pick-to: 6.2
Change-Id: I407307a3769a0c9821d311189ed40b0d48dab4d3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Changing the example to use qt quick controls where it makes sense
Task-number: QTBUG-95739
Pick-to: 6.2
Change-Id: Id0df227657693234de4481c2316dc6c3e0545043
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Updating the example to use qt quick controls 2 where it makes sense, as
well as copyright headers.
Task-number: QTBUG-95737
Pick-to: 6.2
Change-Id: Ie22ab8551926916abd0a478adc16d1d4daeb13ad
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This patch changes the external drag and drop example to use qqc2
checkboxes instead of a custom made component.
It also changes the position of the checkbox in order to avoid having
the label text overlap with it.
Task-number: QTBUG-95736
Pick-to: 6.2
Change-Id: If3e798ea0ccd64921138690c7599876ec0584038
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Take the most obvious candidates, to which users typically turn
when getting started with ShaderEffect or QSGMaterial:
shadereffects
scenegraph/custommaterial
scenegraph/twotextureproviders
As with the parent patch that ports and updates embeddedinwidgets and
quickwidget/qquickviewcomparison to use the proper CMake machinery, we
still need to keep the .qsb files for the sake of qmake. compile.bat and
similar scripts are however removed now. With CMake the .qsb files are
not needed and are autogenerated at build time. Once qmake support
disappears from the examples, the .qsb files can be removed as well.
Pick-to: 6.2
Change-Id: I879354eef2e2179dcd268c9ae9f1402e1eaef379
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For qmake we have no choice but to ship the .qsb files, whereas with
CMake we now rely on qt6_add_shaders.
Pick-to: 6.2
Change-Id: I9bb64a3ffd01cda84fca5a0f7def270975bf71aa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is a pre-requisite to being able to make
qt6_qml_type_registration() an internal rather than public command.
Not all examples have been updated, only those that were using the
qt6_qml_type_registration() command.
Task-number: QTBUG-95093
Pick-to: 6.2
Change-Id: I3f1814a29af608461daa90477eca0aa2304eb9d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The new default is now controlled via a new QT_QML_OUTPUT_DIRECTORY
variable. If that isn't set, the fallback assumes the source directory
structure follows the URI structure and uses
${CMAKE_CURRENT_BINARY_DIR} instead. This pattern means more projects
will have working import paths for qmllint and possibly other tools
out of the box. There should also be fewer cases where the
OUTPUT_DIRECTORY option needs to be used in calls to
qt6_add_qml_module(). The QT_QML_OUTPUT_DIRECTORY variable facilitates
the scenario where QML modules might be distributed across different
parts of the source directory hierarchy, but once collected under a
common base point defined by QT_QML_OUTPUT_DIRECTORY, they form a
coherent set of QML modules whose subdirectory structure below that
base point follows their TARGET_PATH.
Fixes: QTBUG-94164
Fixes: QTBUG-95081
Pick-to: 6.2
Change-Id: I82864c361a2b34f7f1484cdbda0d9b64b34b9950
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The type is immediately visible from the right hand side then.
Change-Id: Ifc1a15e3eea9b5a91ff8647f759d207a0ee221b8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It's a static method. It should be called statically.
Change-Id: I15fc8948988b0a2c0a30f8699949e06c66d92fdf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
The imageelements examples depended on URLs being resolved
relative to the file where it was declared, but in Qt 6
this was changed. Since the source is actually resolved
inside MyBorderImage, which is in content/, we would end
up trying to resolve content/content/foo.png.
To avoid having code depend on the location of types it is
using, URLs have to be packed in Qt.resolvedUrl() in Qt 6.
Change-Id: I16e203e92b3b4c7c573dcdb85dcd556f2103ab80
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The existing CMake API for qml modules had a number of
shortcomings. Refactor it to achieve the following:
- Clearly separate public and internal aspects.
- Re-use code from qtbase for adding plugins and module
targets rather than reimplementing close variations.
- Provide more robust and complete support for qmllint,
qmlcachegen and automatic generation of qmldir files.
- Reduce the steps needed for more common scenarios.
- Encourage the use of separate backing library and plugin
targets.
- Automatically generate the plugin class .cpp file where
possible.
- Specify .qml files directly through qml-specific API
elements rather than assuming they can be extracted
out of a set of resources.
[ChangeLog][QtQml] The qml CMake API has changed from 6.1
and is now out of Technical Preview status. The most
notable change is that .qml files should no longer be
specified as resources, there is dedicated handling for
them in the qt6_add_qml_module(). A related change is
that the qt6_target_qml_files() command has been replaced
by qt6_target_qml_sources(). More complete integration
with qmlcachegen, qmllint and qmldir generation is also
part of the CMake API.
Fixes: QTBUG-91621
Task-number: QTBUG-82598
Task-number: QTBUG-88763
Task-number: QTBUG-89274
Task-number: QTBUG-91444
Change-Id: I25aae1b0e89890394dfe2ba2824008164b2ca8d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The QtQuick examples should ideally have a more native look and feel.
Making them use controls from QtQuickControl will cause them to adapt to
the desktop style.
This patch replaces the previous Sliders from the 'shared' directory,
with Sliders from QtQuickControls2
Task-number: QTBUG-90880
Change-Id: I90521abf7059950521bc3d1a54994d2cca07259d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Replaces the use of custom made components from the shared directory, with QtQuickControls2 components.
Fixes: QTBUG-90883
Change-Id: I6e659188aa75bfacf8181689f30580783bf280a2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Removed dependency to the components in the 'shared' directory from the
project files. The CMakeLists.txt is generated from the qmake project
file using the pro2cmake.py utility.
Task-number: QTBUG-90884
Change-Id: I4f52a065d02bdfc747a2bca89ad0c1707a7ef9ec
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
The member names in the "uniform block" (which is in practice
mapped to a struct uniform with GLSL) must match between the
vertex and fragment shaders, even if the member is not used in
one of the shaders. This is because OpenGL/GLSL's interface
matching rules, which would cause the shader program fail to
link due to a mismatch in the structs in the two shaders.
Pick-to: 6.1 6.0
Change-Id: I9a928b4b20fdff14530c16a93a52967ce6c328a3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Usability has been improved when entering new rows into the database.
The user is now only able to write in the input form when editing
an exiting entry or creating a new entry. The warning message associated
with entering invalid input will now disappear after a few seconds.
The ListView delegate is now slightly larger, and looks slightly better.
Task-number: QTBUG-90884
Change-Id: Idf7ca9c0bb8b86ac06fed80e945800603f7b03d9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Removing MyButton.qml and replacing it with QtQuickControls2.
Task-number: QTBUG-90884
Change-Id: Ie1b22e817dedfd71593b074561bdfe2e7dc36008
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Injected signal handlers are bad practice because they aren't declared.
Pick-to: 6.1
Task-number: QTBUG-89943
Change-Id: I3a691f68342a199bd63034637aa7ed438e3a037b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Assigning objects to signal handlers can be convenient, as seen in the
examples which use it together with ListView.onRemove.
However, that convenience makes it hard to reason about what actually
happens. Moreover, the only user of that functionality are the Animation
classes, and the usage of DefaultMethod is not documented anywhere.
[ChangeLog][QtQml] Assigning an object to a signal handler is deprecated.
Instead, create the object, give it an id, and call the desired slot
from the signal handler. For instance, instead of of
ListView.onRemove: SequentialAnimation {...}
use
SequentialAnimation {id: removeAnimation; ...}
ListView.onRemove: removeAnimation.start()
A warning will be printed whenever an assignment of an object to a
signal handler occurs. The warning can be controlled via the
qt.qml.defaultmethod logging category.
Change-Id: I001ddf4d7933871977f84a5e012d020fb043cc64
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Fix format mismatch
qtdeclarative/examples/quick/scenegraph/d3d11underqml/d3d11squircle.cpp:369:16: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'HRESULT' {aka 'long int'} [-Werror=format=]
qFatal("Failed to create buffer: 0x%x", hr);
by casting to uint (as is done in an existing qWarning()).
Pick-to: 6.0
Change-Id: I9bed3066936af8a1831b695a76d40989a834fde9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
- Remove links to modules and examples that are not part of Qt 6.
- Remove links to entities marked as \internal
- Add missing enum value and QML property docs where it's trivial
to do so.
Task-number: QTBUG-88156
Change-Id: I10a1c7bcc5fe0e2354ea69eaf24930362edb7415
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Don't use particle.r which doesn't exist since the CustomParticle
removal. Make example a bit simpler without this.
Task-number: QTBUG-88173
Change-Id: Id994a9a58796e8194fdccd63c6439d4c19681a45
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It is not building in namespaced builds without this.
Others also needed this include, such as
qml/tutorials/extending-qml/chapter2-methods/piechart.cpp
Change-Id: Ifbb0557655d247b146ca2eddb07ea6813d9ffacb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
As well as the MACOSX_BUNDLE properties as necessary.
Task-number: QTBUG-87664
Task-number: QTBUG-86827
Change-Id: I46769fb543acb2cbeba122470b5e44ad478fbe4e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The screenshot has been out of date for years now. Update it
as well.
Change-Id: I2b9ae3b0c24b0de7f0cd8a2284d67023237f0944
Reviewed-by: Christian Strømme <christian.stromme@qt.io>