This prevents policy warnings in a few cases, and we want people to
opt-in to new policies, so make our examples copy'n'paste friendly.
Pick-to: 6.8
Task-number: QTBUG-126201
Task-number: QTBUG-126468
Change-Id: Iefa666b61c2d2f767da3583f0f6efd8e4a2169e5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@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>
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>
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>
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>
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>
Update docs after b46d6a75ac,
fdbacf2d5c etc.
Pick-to: 6.7
Change-Id: Ieb49d6876f0a86031fb0ffe970f695e5acbe4c43
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@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>
The ButtonGroup was being declared several times rather than once.
Amends b663020c9a.
Fixes: QTBUG-122454
Pick-to: 6.5 6.6 6.7
Change-Id: If66f5a5a6841a56abbf93908c83facc9970def40
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Catch up with recent changes in the default texteditor.qml file:
- TextDocument.status is new; the error signal is gone. Update as in
bec8df96b7 and
1e6cb2462e
- 3bae41faac changed the mapping of the
"OK" checkmark in fontello.ttf
- use Actions to show and change cursorSelection styling, as in
045f9ce192
- set a default window size; it doesn't matter on a mobile device that
runs everything fullscreen, but it's easier to test on desktop with
the -touch flag
Fixes: QTBUG-121840
Task-number: QTBUG-121946
Pick-to: 6.7
Change-Id: If678b92efe4e1824022fa0ee9106c0c3b0b9f194
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Computed properties make it possible to use scoped enum values as
object property names. Amends bec8df96b7
Also remove semicolons for consistency.
Pick-to: 6.7
Task-number: QTBUG-121946
Change-Id: I1ee354722d9f0e065637731d1b535389a9cb0032
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Amends 5647b6900b in which the error
signal was removed and replaced with a status property.
Pick-to: 6.7
Change-Id: I433987fe4c480c910c98c8fd3714c2e426e49c0f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
It was observed that users try to run this example on mobile platforms.
It was never designed for such a usecase and is therefore not supported.
Ref: https://camg.me/qt-mobile-2023/#filesystem
Additionally mention that this is a desktop example in the docs.
Pick-to: 6.6 6.7
Change-Id: I55205e3f2cb3a45aaf18f2a52ea24f54ab8e39bd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
These examples and .conf files were using two different syntax to create
a subgroup. QSettings may not support one of them and is misbehaving. So
let's use one syntax only and the one that it produces when writing the
output.
This code:
s.beginGroup(u"Material");
s.beginGroup(u"Font");
s.setValue("Family", "Open Sans");
s.setValue("PixelSize", 20);
Produces:
[Material]
Font\Family=Open Sans
Font\PixelSize=20
Fixes: QTBUG-121035
Pick-to: 6.7 6.6
Change-Id: I76ffba14ece04f24b43efffd17ab7ea941910c19
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This prevents to reduce the window to a minimum of 1px (default), where
it gets hard to expand the window again. As a drive-by improve the
visualization of highlighted files.
Fixes: QTBUG-119785
Change-Id: Ib4a7f37fa4886589bad4cce534a9d73c352dd4ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Use qt6_query_qml_module to get path to qmldir, but not TARGET_FILE_DIR.
This is more accurate way.
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-120479
Change-Id: I4b7f7bf3b7f69c15871e400af3e7ae945a9bfdf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This depends on the plan to have the Controls MenuBar and context Menu
"go native" on platforms that support it.
Task-number: QTBUG-119988
Task-number: QTBUG-106782
Change-Id: Ib8354b44bde385717431534d0260182715d66f16
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
...and fix a couple of minor issues that remained.
Fixes: QTBUG-81022
Change-Id: I5fc1547fb09caef5a9e24d95c2ca7b8d78ee104a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
In the Controls text editor example, DocumentHandler always sounded like
a hack, just by its name.
We don't expect to be able to handle multiple selections anytime soon;
but if we realistically expect to have multi-seat support in Qt some
day, then probably the multi-user experience should include support for
multiple text cursors and selections. So we shouldn't paint ourselves
into a corner. QQuickTextControl works with only one QTextCursor most
of the time (but it's private, thus modifiable); and TextEdit has
properties like selectionStart, selectionEnd, selectedText, etc. which
seem to assume that there is only one selection. So probably if we
needed to support multiple selections, we could add
Q_PROPERTY(QQmlListProperty<QQuickTextSelection> selections ...),
document that those legacy properties just work with the first
selection, and/or deprecate them.
So with that in mind, let's get started with a QQuickTextSelection
object. We add TextEdit.cursorSelection which holds the single selection
near the text cursor. It provides API needed for tracking and
manipulating often-used properties of selected rich text (such as
QTextCharFormat properties) so that DocumentHandler can be removed.
The example now uses TextArea.cursorSelection to manipulate the selected
text's format. It's not possible to be fully declarative with this API
though; we need to call setFont (by assigning a font), but QFont is a
value type, and is not as mergeable as QTextCharFormat is, for example.
If we used a binding rather than Action.onTriggered, it would trigger
reading the font for an entire span of selected text (which may have had
multiple fonts), setting one attribute (like bold), then applying the
font to the whole span. What we do now is almost like that; but instead
of reading the font first, we start with a default-constructed QFont,
set one attribute, and call QTextCursor::mergeCharFormat(), in the hope
that it can merge only the features of QFont that have actually been
set. Unfortunately this is not quite true either: if you toggle the
bold button, it might change the font size too, and so on; so maybe we
really need QTextCharFormat in QML (as a value type, presumably) to
implement those feature-toggling toolbar buttons correctly.
This API is in tech preview, because of such issues as described above;
because we're just scratching the surface of what might be possible;
because we should perhaps compare popular JavaScript text-editing APIs
that might be found elsewhere, in the meantime get feedback from users
during the tech preview phase, and keep iterating.
[ChangeLog][QtQuick][TextEdit] TextEdit.cursorSelection is a
TextSelection object, which provides properties to inspect and modify
the formatting of the single selection that is currently supported.
This API is in Tech Preview.
[ChangeLog][Controls][TextArea] TextArea.cursorSelection is a
TextSelection object, which provides properties to inspect and modify
the formatting of the single selection that is currently supported.
This API is in Tech Preview.
Task-number: QTBUG-36521
Task-number: QTBUG-38830
Task-number: QTBUG-81022
Change-Id: Icea99f633694aa712d0b4730b77369077288540f
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Since QTBUG-92155 is not done, we need an easy way to load and save text
into and out of a QTextDocument in QML. This patch follows the pattern
from Image and other types: add a `source` property, a URL from which
the file is to be loaded.
When it comes to saving, the pattern is not set: so far the only file
writing that has been available from QML is ItemGrabResult.saveToFile().
Since we need to save in specific formats, it makes sense to continue
that pattern: the text document knows how to do its own serialization,
so this is not suitable for generic data file I/O, even if we did have a
QML API for that. We add invokable functions save() and saveAs() for the
usual use cases in word processors and such. The URL extension
determines the file format.
Setting QQuickTextDocument's source is not allowed if the document has
unsaved changes. The user (app author) needs to call save() or override
modified to false first.
[ChangeLog][QtQuick][TextEdit] TextEdit.textDocument now has a source
property for loading files; save() and saveAs() functions for writing;
a modified property which tracks QTextDocument::modified; and an error
signal in case any of these operations fail. Setting the source
property is allowed only if the document is in unmodified state.
This API is in Tech Preview.
[ChangeLog][Controls][TextArea] TextArea.textDocument now has a source
property for loading files; save() and saveAs() functions for writing;
a modified property which tracks QTextDocument::modified; and an error
signal in case any of these operations fail. Setting the source
property is allowed only if the document is in unmodified state.
This API is in Tech Preview.
Change-Id: I687318523c7a520e02244e47224d067da55318b5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Originally, the onAccepted handler was designed to
simply emit the finished signal whenever the OK button was
clicked, without any checks. This meant that the dialog would
proceed even if some fields were left blank. Now we just
check that the strings are not empty before emitting.
Fixes: QTBUG-119147
Pick-to: 6.5 6.6
Change-Id: Ie8d3a711e139ac824a45cb5c6cfd39248a7bf117
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The texteditor is made to open text, and in this case it makes sense to
pass the Text flag to the QFile::open call in the example code.
Pick-to: 6.5 6.6
Task-number: QTBUG-118636
Change-Id: I936610945aa6e2f67b29ce6f5c559a2b942fc718
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Build the extra QML modules without separate backend library, so that
they load correctly when deployed to embedded device. Deploy also qmldir
files.
Pick-to: 6.6 6.5
Change-Id: I583798eb7841c8fd0520cfa049eaecbadaf50109
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Use the standard keys for zoom and quit.
Pick-to: 6.6
Change-Id: I3659a5a84bc1e46938729710af31c834b8a50ed8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
About popup text item had property 'wrapMode' set to 'wrapAnywhere',
so I replaced it with 'wordWrap'. In addition,
I changed text to be same as in QMessageBox::aboutQt() and wrapped
it inside ScrollView.
Fixes: QTBUG-117969
Pick-to: 6.6
Change-Id: I7a138a4a6bdb592bd3dd8edbeb76042e266b7c6f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
The delegate component in DelegatePage.qml uses properties from
the context where loader exists. This behavior of Loader seems to
be changed and it doesn't forward properties. Thus, property
reference through required properties doesn't work in the component
that's getting loaded, with ComponentBehavior configured as Bound.
This patch makes a workaround by moving the component within Loader
scope and access model properties through its id.
Fixes: QTBUG-117062
Pick-to: 6.6 6.5
Change-Id: Ib1f21f842f9926a426fb79f2fbb2536ed53f98d8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Add mobile example category tags for the chosen examples.
Add for the ones that work best for both Android and iOS.
Remove from the ones that do not work for both (at least yet).
Added, as verified on Android
-scenegraph openglunderqml
-qtquickcontrols-contactlist
-qtquickcontrols-gallery
-qtquickcontrols-wearable
Removed (for now), as not verified yet on Android
-qtquickcontrols-todolist
Fixes: QTBUG-116780
Pick-to: 6.6
Change-Id: I7f22329ec93dedaa63df34bb55dd67d14ffe5c1d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Svg is required for the filesystemexplorer example, but it might not
be available.
Pick-to: 6.6
Change-Id: I0a68c8cabc8c0809a6ed20596fd7fcc9eec5ab7e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Make sure that libMyStyle.so, libMyStyleplugin.so, and the qmldir are
installed.
Fixes: QTBUG-114482
Pick-to: 6.5 6.6
Change-Id: I19b182f9957cc138171f0cb69eb25a42b7bf9b37
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This updated version addresses several bugs and misbehaviors that were
identified in the previous version. I have rewritten and improved
various aspects of the application to provide a more stable and reliable
user experience.
Here are some of the key changes and enhancements in version 2:
- Fix qmllint warnings.
- Reduce the number of redundant items
- Apply the custom window decorations inside MyMenuBar
to the contentItem instead of the background to scale
properly.
- Fix additional scaling and UI misbehaviors
- Add an application icon
- Add an editor with line numbers
- Add command line options to specify an initial directory
- Since rootIndex is exposed inside TreeView since 6.6
this is an excellent opportunity to make use of it
- Crosslink the python version of this example in the docs
Pick-to: 6.6
Change-Id: Ib816a95f843b3f4b84b11db893facda0ffc6f482
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The gallery example depends on two factor to determine its orientation.
Apart from size of the window, the orientation configuration in the
setting (introduced in the patchset
7c7e3a1fdf) would also be considered.
This patchset updates documentation for the change mentioned above.
Pick-to: 6.6 6.5
Change-Id: Iaf46c5cc49350e889121b3e57dc3f86e46609459
Reviewed-by: Juho Lääkkö <juho.laakko@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Also, changed one of the example pages to a tutorial
page.
Task-number: QTBUG-115297
Pick-to: 6.5 6.6
Change-Id: Ife1b740523039b9287008a1c5243edfc4c1349d1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
- Ensure icons are legible when a dark theme is in use in the
underlying OS. The app's own dark mode setting was unaffected by this.
- Remove trailing space in temperature label.
Fixes: QTBUG-114978
Pick-to: 6.5 6.6
Change-Id: Ic31c70c9fe86f4da6850ed4baf28afc1cbfe1dae
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Elias Hautala <Elias.Hautala@qt.io>
Not all compiler warnings can be fixed, because the example
supports multiple styles through one executable, and hence
cannot use compile-time style selection. Document this.
Fixes: QTBUG-110827
Pick-to: 6.5 6.6
Change-Id: I80a92890d427967ff21d4f457c373e75a937195f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The patch set 730c1d1630 adds support for
landscape mode in gallery example. But this causes glitch when window
resizes dynamically (as in this scenario, the virtual keyboard shows up
and it dynamically resizes window).
This patch adds an option in settings to enable landscape mode only
when required and disabled by default.
Fixes: QTBUG-114693
Pick-to: 6.5 6.6
Change-Id: I64cd4d48ade10a4f43615663a0b7aef3e13a2895
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
- Use add_qml_module_to_macos_app_bundle and copy other things from examples
like attachedstyleproperties and painteditem in order to get it to work on
macOS.
- Move qt_standard_project_setup() before qt_add_qml_module() (which is
called by the three add_subdirectory calls). This is required to avoid
issues with subdirectories on Windows.
Pick-to: 6.5 6.6
Change-Id: Ie0d859c743d0b8b798238346cc2c738ece362c99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Don't allow it to fill vertically, because it results in downscaling
artifacts.
- Update the background images to be 128x128 so that no downscaling
occurs (when using the correct size hints in QML).
Fixes: QTBUG-114492
Pick-to: 6.2 6.5 6.6
Change-Id: I473ee26f5ad630bbfa1f89c2a977081fae9eaa4e
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
- Elide radio station name and frequency text.
- Remove "MHz" text. It's not necessary for the end user and it saves horizontal space.
- Move "Sort by" label above options to save horizontal space.
- Fix "Compact" button not being checkable.
- Reduced excessive vertical spacing between some elements.
Fixes: QTBUG-114407
Pick-to: 6.2 6.5 6.6
Change-Id: I0dc2401b6e9ef48fae3212df9c36dd8f5d04a4e9
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Fix \quotefile path as source files have been moved. Also, add .theme
as a valid extension for example files.
Pick-to: 6.5
Change-Id: Icfcb85fdfb99e86eb97ef6e1b53e4fa5771095a3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
- Move all (non-icon) images into one directory for simplicity.
- Add explicit qrc prefix to image paths to make them absolute
and ensure they're found, fixing some errors.
- Fix "XMLHttpRequest: Using GET on a local file is disabled by
default" warning by setting QML_XHR_ALLOW_FILE_READ to 1.
- Fix "Parameter "page" is not declared" warning.
- Replace qt6_add_resources with qt_standard_project_setup and
qt_add_qml_module.
- Remove unnecessary quotes from CMake file paths.
- Replace local settings instance that was accessed via the
root context through several files with a singleton.
- Make the custom Controls style a proper QML module.
- Make the settings singleton its own module to avoid cyclic imports.
- Adapt documentation to new paths.
- Some ids (in Main.qml) are unused by QML, but used by the
documentation, so those are left alone.
- Fix qmake build files after these changes.
Fixes: QTBUG-112618
Pick-to: 6.5
Change-Id: I10f6e1f2013fe35eaf4e1e0f4aaa98e6a1ab9c15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.
Pick-to: 6.5
Task-number: QTBUG-113277
Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The FileSystemModule qmldir was explicitly put into the "/" resource
prefix, but that prefix is not a default qml import path. That caused
the qml module not to be found when building on macOS as an app
bundle, which relies only on resources and not the file system to find
the module.
To ensure the module qmldir is found in the resources, we want it to
be placed in the default qml import path ':/qt/qml'. To do that,
remove the previously specified RESOURCE_PREFIX option and enable
the QTP0001 policy by requiring Qt 6.5+, which will put the module
qmldir into :/qt/qml/FileSystemModule/qmldir.
Because the policy also changes the resource prefix for other
resources (images), adjust all Image source urls to be relative paths
(relative to the component), instead of absolute paths.
Also adjust the qmake generated qrc file to place the files into the
new resource prefix.
Amends 213e932e13
Fixes: QTBUG-112683
Change-Id: I5205cf6d399a6faaf7cce68d55c71dade37479a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
The '\meta category' command was used for tagging examples with a
specific category, used in Qt Creators Welcome mode.
As we want to also generate lists of examples belonging to a category
elsewhere in the documentation, replace the command with a macro that
expands to the original \meta command and also adds the example to
a group using the \ingroup command. This way, the category names can
be used as arguments to the \generatelist or \annotatedlist commands.
Pick-to: 6.5
Task-number: QTBUG-112731
Change-Id: I673207be9dd73a010069828b92146c37e45e9143
Reviewed-by: Paul Wicking <paul.wicking@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>
The quickcontrol feature represented in side-panel and swipe-to-remove
were already part of gallery example and hence, removing these two
examples
Fixes: QTBUG-110989
Pick-to: 6.5.0
Change-Id: I496dfe7ee2bea98f918b4e3b72673388c51cda6b
Reviewed-by: Mitch Curtis <mitch.curtis@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>
Adapt to qtbase/14f9f00fdb2dc428610c08e3d9d03e38e9602166, fixing:
sqlcontactmodel.cpp:40:13: warning: void QSqlQueryModel::setQuery(const QSqlQuery&) is deprecated: QSqlQuery is
not meant to be copied. Pass it by move instead.
[-Wdeprecated-declarations]
Pick-to: 6.5 6.4 6.2
Change-Id: I88d7f30247876f55b0114785efcf4ce580de0ab8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This example shows the customization of Qt Quick Controls by
implementing a simple file system explorer. Using a C++ model, entries
are visualized in a TreeView, and text files can be read.
Fixes: QTBUG-108289
Change-Id: I966dcf65e40d3b727889dc14c65edd0ffcc1b878
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
So that users can see the theme change while the popup is open
Change-Id: I9cac09badc04c5dcace45dadaa9282900b093e17
Pick-to: 6.5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Writing AUTO_RESOURCE_PREFIX in every qt_add_qml_module call seems
rather pointless.
In addition:
- Add documentation for QTP0001.
- Adjust some of the examples to use QTP0001 policy.
- Improved the error message.
Pick-to: 6.5
Task-number: QTBUG-96233
Change-Id: I6e19a491acba97493893bf1953fca3462296c1ea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@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>
What we want there is intercept the URL through the QML engine. No need
to dig out the specific QQmlFileSelector for that.
Pick-to: 6.5
Fixes: QTBUG-102777
Change-Id: I5ca59316a2434013f91afdf92d3e397ea2711128
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
The QuickControls2 module has been moved to src/quickcontrols. Its
examples are in examples/quickcontrols.
Adjust the .pro file name in examples/quickcontrols and fix the SUBDIRS
entry to it.
This amends commit 4bd87b903b.
Pick-to: 6.5
Task-number: QTBUG-109383
Change-Id: I9de70a773a11344398c01b3e84e557213268c935
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Work on this was already started for the documentation in
1abdfe5d5a.
The CMake target (docs_QuickControls2) probably can't be renamed
until we rename the library, which won't happen until Qt 7.
Task-number: QTBUG-95413
Change-Id: Ied20805a91286436606577c3de39671a447f27dd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Qt Quick Controls 2 was named that way because it was a follow-up to
Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer
supported, we don't need to have "2" in the name. Work on this was
already started for the documentation in
1abdfe5d5a.
By doing this renaming a few weeks before feature freeze, it won't
affect the release but still results in as little time possible spent
manually fixing conflicts in cherry-picks from non-LTS releases as a
result of the renaming.
This patch does the following:
- Renames directories.
- Adapts CMakeLists.txt and other files to account for the new paths.
A follow-up patch will handle documentation.
It does not touch library names or other user-facing stuff, as that
will have to be done in Qt 7.
Task-number: QTBUG-95413
Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>