Extend existing documentation of qml_in_android_studio_projects
to explain the adding and using of another QtQmlComponent in
qml_in_kotlin_based_android_project.
Task-number: QTBUG-126050
Pick-to: 6.8
Change-Id: Ib1444ed883c87bcf5c8e3fe9f423dbfef5c8fa66
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
According to QUIP-18 [1], all example files
should be LicenseRef-Qt-Commercial OR BSD-3-Clause
Example takes precedence over build system
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.8
Task-number: QTBUG-121787
Change-Id: Ia60be3cc375a3a16af7e6ea7755a61cfe6e1573b
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Extend existing documentation of qml_in_android_studio_projects
to explain the adding and using of another QtQmlComponent in
qml_in_java_based_android_project.
Task-number: QTBUG-126050
Pick-to: 6.8
Change-Id: Id5b0708c73c52efbe0c3cae46d2869014fb0bae5
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Add implementation for second qml component in
qml_in_kotlin_based_android_project
Task-number: QTBUG-125099
Pick-to: 6.8
Change-Id: Id0b6c693aac2d67cceda74e623fcd18c9568b84a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Adds another Qml component into the qml_in_android_view example
that can be used in qml_in_java_based_android_project.
Functionality to load another Qml component in
qml_in_java_based_android_project.
Task-number: QTBUG-125098
Pick-to: 6.8
Change-Id: If85e977ef0057ab9bca93e7b2136d37b01a5c7de
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Change Qml Embedding examples docs to reflect the new strong typing
changes in the qml_in_kotlin_based_android_project.
Task-number: QTBUG-126050
Pick-to: 6.8
Change-Id: Ic8a6c8acefa32efed93faca90dd776b62c5b8a05
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Change Qml Embedding examples docs to reflect the new strong typing
changes in the qml_in_java_based_android_project.
Task-number: QTBUG-126050
Pick-to: 6.8
Change-Id: I855a0f5043d956b644602dc9feba0d568d464b14
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Changes the way QtQuickView is used in MainActivity.kt
Task-number: QTBUG-125099
Pick-to: 6.8
Change-Id: I9308fc08cd7ddbec8955baccf95fa0c05117e305
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Bump Android minmum SDK version in qml_in_kotlin_based_android_project
gradle config from 26 -> 28.
Qml embedding Kotlin example has a minimum Android SDK set to 26
in the project gradle config. Qt androiddeployqt has a minimum
supported Android SDK set to 28 for Qt 6.8.
This creates a dependency issue with the included .aar lib built with
Qt.
Fixes: QTBUG-125961
Pick-to: 6.8
Change-Id: I2bc54d1303ee41e2697a296f973e0bab01f1356c
Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
If the user drags a column from outside the visible area and drops it
into the visible area when the column contains a formula that depends
on a visible cell, updating that cell will not update the cell
containing the formula.
The reason is that the update method in the SpreadModel updates the
wrong rows and columns. The visible rows and columns need to be mapped
to the model's rows and columns.
The improvement is that the update uses a mutex instead of enabling or
disabling the connection in the view. However, the blockConnection()
function has been kept because some actions need to update a large
amount of data in the model, and then the view can be updated without
any extra view updates.
The pan and reset_reordering icons are updated. The new icons have
been designed by the designers.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: I20ea1ef0bb777b5b0b04e7ae74df172ffc5b5ed8
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
The HelpDialog is improved by defining an inline component inside it.
The column selection issue is fixed by removing the unnecessary margins
and rows as well.
When the user tries to cut cell data and paste it onto an area including
the cell itself, that cell would be deleted because it was a cut action.
However, this is not correct because the value of that cell is replaced
with the data from the clipboard (mime data) already. To fix this bug,
before deleting the data of the cutting cell, that cell should be
checked to ensure it is not part of the target cells.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: I1adab2c17dab1cf07245bfaed03193904d7d7a2e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Refactor Java example xml widget ids, because some of them were a bit ambiguous.
Pick-to: 6.8
Change-Id: I49f6e1bb14d42859164bf12cb386b779dcaaee15
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The example demonstrates a Spreadsheet that provides adding, editing,
and deleting data, and also the ability to write formulas for numeric
data. Also, it's possible to select cells, rows, and columns for
deleting them or their data, copying or cutting the data, and dragging
them to other places. The user can hide columns or rows, and also show
them again. Thanks to the reordering API, columns and rows can be
reordered and also can be reset to the default order.
There is a SpreadModel class which handles the entered data. It only
stores the data of the cells that is provided by the user. It means
that it does not create any empty data structure for empty cells, in
order to reduce memory usage.
Task-number: QTBUG-125767
Pick-to: 6.8
Change-Id: I1d9cc5b4b8d902257e9ed508d4a712b0574490f3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Bump Android minmum SDK version in qml_in_java_base_androi_project
gradle config from 26 -> 28.
Qml embedding Java example has a minimum Android SDK set to 26
in the project gradle config. Qt androiddeployqt has a minimum
supported Android SDK set to 28 for Qt 6.8.
This creates a dependency issue with the included .aar lib built with
Qt.
Fixes: QTBUG-125961
Pick-to: 6.8
Change-Id: I3b611669ec52621171e9b88f34286fa1b2492faf
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Changes in the way QtQuickView is used in MainActivity.java
Task-number: QTBUG-125098
Change-Id: I4b60bde84df17b8d765bf6a974e4b13cb38f5bc2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Rename qml_in_android_view example main.qml to Main.qml because
qml files starting with lower case letters are considered to be only
files not components.
Rename qml_in_android_view example URI because if the URI and module name are same there is a class name clash with the Qml Component Java code generation.
Covers: QTBUG-125159
Task-number: QTBUG-125098
Change-Id: I40394d890ed680f17fe49d650bc42c2a3d3348e4
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
This introduces a "fillItem" property to ShapePath. Similar to
gradient, this enables filling a shape with any texture provider
item, such as an image, a ShaderEffectSource or a layer-enabled
item.
Fixes: QTBUG-104121
Change-Id: I8748a90c825e8eb4655a4ac90648c6ae74420527
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Using textureSize in the uniform block leads to renaming it
to _textureSize when transpiling to GLSL. This is not
reflected in the reflection metadata for some reason.
For OpenGL this matters because the QRhi backend won't
be correctly able to set up the uniforms when the
names do not match. To overcome this, use a name
in the shader that does not conflict with a built-in
GLSL function. Strictly speaking the name (textureSize)
is somewhat incorrect anyway. Use texCoordScale to
express its meaning better.
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I863e98c6d56cc46fad895763b9b5106a40e2952c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This new path element type is particularly useful for QuickShapes,
where it can be used to mimic a Rectangle item. It provides the same
API for specifying common and/or individual corner radii.
[ChangeLog][QtQuick] Add PathRectangle, a PathElement for optionally rounded rectangles
Fixes: QTBUG-123913
Change-Id: Ia0de252f70c665bd70f63aa31e3010584cc9cd8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Documented the qml_in_kotlin_based_android_projects example in the
same .qdoc file as the qml_in_java_based_projects example.
Added snippets tags to MainActivity.kt.
Added support for code snippets from .kt files in qtquick.qdocconf.
Fixes: QTBUG-123423
Pick-to: 6.7
Change-Id: I5ac4d231bf77a23b4083ca26712949d66c2483c1
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Add new project folder qml_in_kotlin_based_android_project which
include the new Android Studio project.
Fixes: QTBUG-120717
Pick-to: 6.7
Change-Id: I53023c897c92d275018b4e40ab84a3b60e0afa1f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The method got removed in Qt 6.0, and the example code was adjusted
accordingly (commit fb96109bbc).
While at it, also remove the mentioning of the even older
QQuickWindow::createTextureFromId(), as that is most likely
not relevant for new users looking into this example.
Pick-to: 6.6 6.7
Change-Id: I2ea3fcf3de78e13afec9e2b25aa8d4a6a9a9b571
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The custom rendernode example uses the default GLSL which is:
"100es,120,150". The problem with this is that gl_VertexId only
exists in OpenGL ES 3.00 or later, and GLSL 1.30 and later
end result is that the shader compiles but does not run.
Change-Id: I1ac18e381b1e8b28368f67e4140f4bb43bb17e62
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
There are issues with for loops in GLSL, see for instance:
https://learnwebgl.brown37.net/12_shader_language/glsl_control_structures.html
The solution is to rewrite the shader so that it also works on WebGL.
Fixes: QTBUG-123593
Change-Id: Ia9fd4d9ef3f1b99a29d4bbabae20ad779fe4fbba
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Added a qdoc file to the top folder and edited the qtquick.qdocconf
file to include it as src and for snippets.
Task-number: QTBUG-122964
Pick-to: 6.7
Change-Id: I581e369b0682804729a98288164492ac1c604194
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Add new example showcasing how to embed QML into native Android
Java application.
New folder platforms/android, which include the new
Android Java project and Qt project in their own project folders.
Pick-to: 6.7
Fixes: QTBUG-120716
Change-Id: Ibab8b7653eb7d4199b93630d03f3543d0d734c4a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor
A few examples had to be adapted manually, mostly those that build
additional qml modules / plugins.
The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed, these are not needed anymore because example directory
selection is handled by the qt_internal_add_example calls.
The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_qml_app_script.
A qt_generate_deploy_qml_app_script call was added for each
executable target.
Note that the deployment step will be skipped in the CI for now,
because:
- we enable QT_DEPLOY_MINIMAL_EXAMPLES in the CI instructions and thus
set QT_INTERNAL_SKIP_DEPLOYMENT to true
- standalone examples feature is not yet enabled in the CI, which
means we continue to build examples in-tree, and deployment is
disabled for in-tree prefix builds.
A small list of examples to deploy in the CI will be chosen in the
future, to ensure deployment coverage, without slowing down overall CI
times due to all the *deployqt invocations.
Even if deployment is disabled in the CI, the install(TARGETS) calls
for each example will still run, installing into an
'installed_examples' directory, which will not be archived by the CI.
The QtBundleQmlModuleForMacOS and bundle_shared code was removed,
because we can now depend on the MACOS_BUNDLE_POST_BUILD option of the
deployment api, to ensure macOS bundle examples run properly in the
build dir. This works even in prefix in-tree builds, when installation
deployment is disabled.
Finally, for all examples that build additional qml module libraries or
plugins, the libraries / plugins must be installed into the bin dir of
each project, along with a qmldir file.
This is to support running the installed project for platforms that
don't have deployment api yet, like boot2qt / yocto.
If we want to have super clean install / deployment rules in the
future, we won't be able to avoid adding ugly per-platform conditions.
The current status quo is deemed an improvement over what we had
before.
Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I843d934668c25dbcd1abca52495b393579633fc5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The example didn't set the QTP0001 policy, causing loadFromModule to not
find the QML file. Use qt_standard_project_setup to set the policy, and
remove the now superfluous AUTOMOC setting.
The qmake project already migrated to putting the files into the default
resource path, that's why it was working.
Fixes: QTBUG-122564
Pick-to: 6.7
Change-Id: I802bb64b6cab3ad6b21737b41713efb6353385ea
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Add a PauseAnimation so that the notication section is
properly shown. Before it was being hidden immediately after being
shown and was therefore impossible to see.
Pick-to: 6.7 6.7.0
Task-number: QTBUG-123318
Change-Id: I9877a3ac069a74bf370532ea0133fad33a43a2e6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Example takes precedent over build system file type.
According to QUIP-18 [1], all examples file should be
LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Ie8c2539e7659f53a1fd6b48f99ee883ee9aeb0a7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
- text formatting includes alignment, not just font properties
- update links in example.md
- update texteditor.html: don't mention Qt Labs Platform, but
link to some recent new stuff
- if ToolButton.action is bound, enabled is redundant (the Action
already has it)
- don't include QApplication
Amends 6217408799 and
21b3c4741e
Change-Id: Ie4565829f02d8ee1541ba4af9d64bd044739179f
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Correct a typo in the view list. Modify "a ObjectModel" for
"an ObjectModel"
Task-number: QTBUG-119689
Change-Id: I96328df0d20bf264810ad9759c085d558ff600fc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This fixes the background color of the rendercontrol
example.
Essentially we cannot assume the OpenGL background color
is stored in the state, and need to set it every frame
Change-Id: I5bb14f10c4049ca2e5657cceb4550e23fbf4d968
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
We also move ScrollBar to make explanation easier.
Pick-to: 6.7 6.7.0
Change-Id: If65de335f840382b5e236d8a04db382b0b7aee6a
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
I'm not sure why the example was written with so much repetition,
but there must have been limitations back then. It's better to have
Action as the encapsulation for an operation, and simply bind it to
all the places where it's used (menubar, toolbar and context menu).
It would be even better if an Action could be added directly to a
Menu or ToolBar, but so far there's not a declarative way to do that
(only by using addAction(), which is only in Menu, not ToolBar).
We now use TapHandler instead of MouseArea to open the context menu.
It works fine either way, but at least we don't need anchors.fill.
Pick-to: 6.7 6.7.0
Change-Id: I74900ec49b57b616ffacddcf81c5aea12d4fefe6
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
The onClosed slot invokes SameGame.saveHighscore function
in samegame.js. Also the startNewGame function in samegame.js
is triggering the SameGame.saveHighscore function by calling
Dialog.hide, which in turn calls the onClosed slot. This leads
to duplicate highscore entries. Moving the closing of the
dialog after the clearing of the board/score and additionally
adding a condition that if the score is 0, no highscores are
saved, the duplication is avoided.
Fixes: QTBUG-119812
Pick-to: 6.7 6.6
Change-Id: I6aa433789f197a0d1e70abc82baf893934e53be5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Update docs after b46d6a75ac,
fdbacf2d5c etc.
Pick-to: 6.7
Change-Id: Ieb49d6876f0a86031fb0ffe970f695e5acbe4c43
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Widgets that had been broken out to separate top-level windows would
live on after the mainwindow was closed. Subsequent attempts to move
them back to the tab widget would crash, since the that would be
deleted by then. Fix by closing detached top-level windows on
mainwindow close.
Fixes: QTBUG-122790
Pick-to: 6.7 6.6 6.5
Change-Id: I0ae268c5e30b6563dc1556b3f79a83418cc3c703
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
...according to the Qt 6.7 CMake API review.
Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I36d716845d2ce9ed09ed9840f7a1564f59f36977
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The size policy of item updated as part of task QTBUG-117597. This
patch update existing examples and manual tests that depends on quick
layout to embrace size policy change.
Task-number: QTBUG-117597
Pick-to: 6.7
Change-Id: I68469a3bba3c4d3e5ed4b6eae0fd765b5206efc0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>