Commit Graph

1921 Commits

Author SHA1 Message Date
Andreas Eliasson a7bd27f17d Doc: Fix qsTr() link
Fixes qdoc warning:
qtquickcontrols-texteditor.qdoc:128: Can't link to 'qsTr'

Pick-to: 6.8 6.7
Change-Id: Ib2543779cc97052fd754b417468cb315313503a9
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-07-01 05:21:46 +00:00
Konsta Alajärvi e13c89d293 Documentation follow up for strong typing changes in Kotlin example
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>
2024-06-28 12:43:00 +03:00
Lucie Gérard 746ee15415 Correct license for example files
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>
2024-06-27 09:17:10 +02:00
Konsta Alajärvi 31443dec1b Documentation follow up for strong typing changes in Java example
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>
2024-06-27 07:39:46 +03:00
Konsta Alajärvi 1d61d52098 Add another QML Component into qml_in_kotlin_based_android_project
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>
2024-06-24 13:09:33 +03:00
Konsta Alajärvi c62efe4d7f Add another Qml component to Java example
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>
2024-06-24 08:06:18 +03:00
Konsta Alajärvi fae951b94e Strong typing changes to Qml Embedding Kotlin example documentation
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>
2024-06-18 07:45:45 +00:00
Konsta Alajärvi 6dd80d7894 Strong typing changes to Qml Embedding Java example documentation
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>
2024-06-17 05:20:59 +00:00
Konsta Alajärvi 227d798d98 Use QtQuickView with strong typing in qml_in_kotlin_based_android_project
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>
2024-06-16 13:59:07 +03:00
Konsta Alajärvi 9eb9b6e41e Bumb Android minimum SDK version in qml_embedding Kotlin example
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>
2024-06-13 12:58:37 +03:00
Even Oscar Andersen 7796a5632e wasm: Move OpenGLUnderQml to VertexBufferObject to satisfy WebGL
To make the example work under webassembly also

Change-Id: I9eb7ab4503efcffa68d4de3008c8275f723ec659
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-06-11 12:04:07 +02:00
MohammadHossein Qanbari 5bdf12fc6a Spreadsheet Example: Fix bug in update and minor improvement
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>
2024-06-11 05:23:07 +02:00
MohammadHossein Qanbari e0e2f447ad Spreadsheets Example: some fixes and improvements
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>
2024-06-11 05:23:03 +02:00
Konsta Alajärvi e0b1f70e27 Refactor Java example xml widget ids to be more descriptive
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>
2024-06-04 22:27:48 +03:00
MohammadHossein Qanbari 3de85ce8b9 Add the Spreadsheet example
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>
2024-06-03 17:27:22 +02:00
Konsta Alajärvi d2ffd5b59e Bump Android minimum SDK version in qml_embedding Java example
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>
2024-06-03 11:51:28 +00:00
Konsta Alajärvi f16e05ade6 Use QtQuickView with strong typing in qml_in_java_based_android_project
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>
2024-06-02 08:39:30 +03:00
Konsta Alajärvi 8ff9a21709 Rename qml_in_android_view example main.qml and URI
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>
2024-06-02 08:39:27 +03:00
Eskil Abrahamsen Blomfeldt b70dc1196c Texture fill for shapes
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>
2024-05-27 17:36:45 +02:00
Laszlo Agocs 3d8c869768 graph example: Do not use GLSL functions as uniform names
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>
2024-05-27 09:36:13 +02:00
Eirik Aavitsland 22272aefeb Add PathRectangle, a PathElement for optionally rounded rectangles
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>
2024-05-26 18:04:42 +02:00
Eirik Aavitsland 31d652d73b Add fillTransform property to ShapePath
This adds functionality corresponding to QBrush transform to QuickShapes.

Change-Id: I2b5903f8c228adec65a6f5be64e3816143879302
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-05-14 20:06:17 +02:00
Konsta Alajärvi 947986009d Adds documentation for the qml_in_kotlin_based_android_projects example
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>
2024-05-03 17:03:14 +03:00
Konsta Alajärvi e8060eac72 Add example showcasing embedding QML to native Android Kotlin project
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>
2024-05-02 13:17:15 +03:00
Kai Köhne 79c3fb123d Doc: Fix mentioning of QQW::createTextureFromNativeObject in example
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>
2024-04-19 16:15:15 +02:00
Even Oscar Andersen 793f81b1c6 Set correct shader version for CustomRenderNode example
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>
2024-04-19 12:39:01 +02:00
Even Oscar Andersen 547de2d4e5 wasm: CustomMaterial: Change shader program so that it is accepted by WebGL
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>
2024-04-18 11:39:16 +02:00
Nicholas Bennett 0b594fb3ba Adds documentation for the qml_in_java_based_android_projects example
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>
2024-04-17 02:00:15 +03:00
Mitch Curtis 85ea1653db Fix contactlist example not finding ContactList type on macOS
ec9312687e added
NO_RESOURCE_TARGET_PATH, which causes issues on macOS.

Fixes: QTBUG-123773
Pick-to: 6.5 6.7
Change-Id: I80f4cb740dde47549e4357f08b6ae00c243b77b5
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-04-15 09:27:29 +08:00
Konsta Alajärvi 1fd9c628f5 Add example showcasing Embedding QML to native Android Java project
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>
2024-04-10 13:24:53 +03:00
Ulf Hermann bb6cde5229 Modernize "extending QML" tutorial
- Use qt_standard_project_setup()
- Don't use NO_RESOURCE_TARGET_PATH
- Use QQuickView::loadFromModule()

Pick-to: 6.7
Change-Id: Ie68fbcaaa8824ca1cfe186bc9ead905e705e97c7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-05 00:42:09 +02:00
Olivier De Cannière a8f6a298ae Examples: Port the i18n example to loadFromModule
Change-Id: I81946dc3e1c23f0a0f2eaad866deff652a7c0563
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-04-04 10:46:13 +02:00
Alexandru Croitor a6bd1dc3e0 CMake: Add deployment API to our examples
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>
2024-03-27 18:57:34 +01:00
Fabian Kosmale e6ddee9c57 Fix contactlist example (CMake version)
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>
2024-03-27 16:26:16 +01:00
Tor Arne Vestbø 655ff8592b Use new Qt configure feature for Metal
Change-Id: I603018d3f4c6a49c39f7daed25101c24edbbfc02
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-03-25 19:03:08 +01:00
Frédéric Lefebvre d0dafdbc2a Add pause for the notifications to be properly shown
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>
2024-03-22 17:11:40 +00:00
Lucie Gérard 53295d9102 Correct license for examples files
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>
2024-03-21 10:41:29 +01:00
Shawn Rutledge a96871eac8 Adjust Controls Text Editor example and docs further
- 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>
2024-03-18 22:02:01 -07:00
Frédéric Lefebvre 060caf44f8 Correct a typo in the view list. Modify "a Object" to "an Object"
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>
2024-03-18 15:59:21 +00:00
Even Oscar Andersen a67e6bd1ad wasm: rendercontrol example -background color
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>
2024-03-16 09:06:19 +01:00
Shawn Rutledge 6217408799 doc: Update Controls Text Editor example docs
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>
2024-03-12 14:24:26 -07:00
Shawn Rutledge a27b75c89d TextEditor example: use Actions in a DRY way; TapHandler
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>
2024-03-12 17:56:34 +00:00
Wladimir Leuschner fddba23321 Fix duplicate HighScore when replaying SameGame Example
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>
2024-03-12 15:01:39 +00:00
Shawn Rutledge 93a18268f9 doc: Update TextEdit.textFormat, text and TextDocument.source
Update docs after b46d6a75ac,
fdbacf2d5c etc.

Pick-to: 6.7
Change-Id: Ieb49d6876f0a86031fb0ffe970f695e5acbe4c43
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-03-06 20:40:19 -07:00
Laszlo Agocs 2f3bf5f515 Use scoped enum for format in rhitextureitem example
Pick-to: 6.7
Change-Id: I2add2eb838cf7087902fbb264cef5e849435ab6e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-05 11:33:51 +01:00
Laszlo Agocs c00e6b1c40 Follow QQuickRhiItem property rename in example
The example was not updated.

Pick-to: 6.7
Change-Id: Ib9afde58b3f48639cf77848e36ee503df78bdd53
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-03-05 11:33:49 +01:00
Eirik Aavitsland 1ebd8ef853 quickwidget example: Avoid potential for crash on close
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>
2024-02-29 17:56:20 +01:00
Venugopal Shivashankar cb714b1f74 Doc: Fix broken link
Fixed the following qdoc warnings:

- src/quick/items/qquickitem.cpp:[7966,7974]: (qdoc) warning: Can't link to 'QQuickControl'
- src/quick/items/context2d/qquickcontext2d.cpp:3412: (qdoc) warning: Undocumented parameter 'imageData' in Context2D::createImageData()
- src/quick/items/qquicktableview.cpp:1230: (qdoc) warning: Undocumented parameter 'cell' in TableView::modelIndex()
- examples/quick/quickshapes/weatherforecast/doc/src/weatherforecast.qdoc:[13,21,27,45,78,83,93,102,105]: (qdoc) warning: Can't link to 'Qt Quick Shapes'

Fixes: QTBUG-122230
Pick-to: 6.7
Change-Id: I4f533ed95c13a99d649568d7b773437712b5b2d1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-02-23 10:26:38 +01:00
Joerg Bornemann 7d1dd8d71d CMake: Rename I18N_*LANGUAGES variables and parameters
...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>
2024-02-21 14:27:54 +01:00
Santhosh Kumar 8d3ed392bb Update manual tests and examples for change in default size policy
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>
2024-02-21 14:27:54 +01:00