107 Commits
Author SHA1 Message Date
Alexei CazacovandQt Cherry-pick Bot 286709251c Docs: Update the screenshots for the Qt Tools examples
This commit updates the screenshots for the Qt Assistant and Qt Designer
examples.

Task-number: QTBUG-69988
Change-Id: I17da7c173a7a8cac4d55f91aecefdf5473eef98a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 37378a0abca03f50f8a5c51a53ddccbd8077d643)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 05:51:08 +00:00
Lucie Gérard c094f1fced Change license for build file in example
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
Task-number: QTBUG-121787
Change-Id: Iace5eb946b0291ecdf54f7e42ba56e8912ea438b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-15 17:28:06 +01:00
Friedemann Kleint bd6cfe6a56 Rename 'Qt Designer' to 'Qt Widgets Designer'
Task-number: QTBUG-122253
Change-Id: I64b4b1deb758b716355159c4abb8f7ba914a3e1a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-19 15:54:57 +01:00
Friedemann Kleint 0e63b935c9 Qt Designer: Use \QD macro in documentation
Task-number: QTBUG-122253
Pick-to: 6.7
Change-Id: I108e94cf3e0097383de379dbf6f5d42561b55201
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-02-15 16:31:56 +01:00
Matthias Rauter b420e7aeb5 Refurbish the custom widget example
The custom widget has the appearance of the analog clock, which
was refurbished with 619ec1a6406a8be7bfa9d96b9e693e7a3323d8dc.
This change applies the refurbished design to the custom widget.

Task: QTBUG-118871

Pick-to: 6.6
Change-Id: I4a751a54d91d7eaa13f2282a9f1a1a26d91a204c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-11-17 12:35:28 +01:00
Friedemann Kleint f94f39dd2d Fix meta data of the Qt Designer "Multiple Inheritance" example
Amends db7a30bd1d

Pick-to: 6.6 6.5
Fixes: QTBUG-117214
Change-Id: If95937fd606c05c96b6ee83fd9ad73c771a49781
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-09-25 16:58:57 +02:00
Kai Köhne 5a07ba988e Examples: Remove unnecessary Q_INIT_RESOURCE calls
Explicit calls to Q_INIT_RESOURCE are only needed for
resources embedded in static libraries. See also

  https://doc.qt.io/qt-6/resources.html#explicit-loading-and-unloading-of-embedded-resources

Pick-to: 6.5 6.6
Change-Id: I68c383be82478db7967136ccefdc3e4ee688e96f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-05 08:03:40 +00:00
Joerg Bornemann f64ab44deb Clean up Designer's extension plugins examples' qmake files
The QTDIR_build scopes are not used anymore.

Pick-to: 6.5
Change-Id: Ic722645641419b3beb22ac36a02a862f6e7b179e
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-31 14:22:29 +02:00
Topi Reinio a3379894bb Doc: Use the \examplecategory macro to tag examples
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: I28dfd6d5540dfe540bab942f9e9a93e9c239e206
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-04-11 13:55:28 +00:00
Friedemann Kleint 989241b414 Qt Designer: Remove worldtimeclock example images
Amends 1f859ca1ac.

As a drive-by, remove the outdated arthurplugin-demo.png.

Task-number: QTBUG-110447
Pick-to: 6.5
Change-Id: Iead32aaca944a886d86dd36465a2082309821be7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-24 17:22:07 +01:00
Friedemann Kleint e4f952fb82 Qt Designer/QtUiTools examples: Add categories
Task-number: QTBUG-110447
Pick-to: 6.5
Change-Id: If00868910d64168d4f5d7280945985490984762c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-20 11:59:18 +01:00
Friedemann Kleint 5b3b7c4f85 Qt Designer/QtUiTools examples: Drop 'Example' from titles
Task-number: QTBUG-110447
Pick-to: 6.5
Change-Id: Ia9c06560f15dfee58a8a441c3791785827b70913
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-20 11:59:13 +01:00
Friedemann Kleint 273202689f Fix oversights of the Qt Designer Multi examples code changes
- Use new string literals
- Reorder includes
- Use some auto
- Minor fixes

Amends d1e672c47f.

Pick-to: 6.5 6.4
Fixes: QTBUG-110447
Change-Id: I22c2ee4f2770e2656a6ffad0823ec59f7cf3df23
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-20 11:59:06 +01:00
Friedemann Kleint 36d6209182 Update screenshots of the Qt Designer examples
Remove duplicated identical pictures and replace
taskmenuextension-example-faded.png by a normal screenshot
since it is hard to maintain.

Task-number: QTBUG-110447
Pick-to: 6.5
Change-Id: Iba7ee91dee8fb63af40c1c9b4163d573a1deae5f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-02-16 14:59:34 +01:00
Friedemann Kleint db7a30bd1d Move the uitools multipleinheritance example to calculatorform_mi
It illustrates how to use multipleinheritance from Ui struct and widget
and is not really related to UiTools.

Task-number: QTBUG-110447
Pick-to: 6.5
Change-Id: If6b61c76ea0ac07b935f1e0a8ee02a2e7179cdc3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-10 10:12:35 +01:00
Andreas Eliasson ac8cc15fe7 Doc: Remove duplicate words
Change-Id: If596f8677bbebba160e740dfcc24bba064dcb85f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-02-09 14:10:38 +01:00
Friedemann Kleint 1f859ca1ac Qt Designer: Remove worldtimeclock examples
The functionality is sufficiently demonstrated by the existing custom
widget plugin examples.

Task-number: QTBUG-110447
Pick-to: 6.5
Change-Id: I09198bba46ebe8da03c9e21192588e6010bec541
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-08 21:41:42 +01:00
Friedemann Kleint 64001fc4c6 Exclude Qt Designer plugin examples from cross-builds
For some reason, they cannot be installed into sysroot,
Complements 81fdb4dee5.

Fixes: QTBUG-110930
Pick-to: 6.5 6.4
Change-Id: Ia6f4d123f7435a1388bb3cfef38daa48120b4891
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-06 12:20:37 +01:00
Friedemann Kleint 64fab45f26 Qt Designer examples: Add explanation of CMake project files
Pick-to: 6.5 6.4
Task-number: QTBUG-110447
Change-Id: I36769acc50921c2e6af33288b8e291b56328ddc7
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2023-02-02 11:01:56 +01:00
Friedemann Kleint 81fdb4dee5 Qt Designer: Fix install of plugin examples
Pick-to: 6.5 6.4
Task-number: QTBUG-110447
Change-Id: I1b243a6a564ea18d684a8d5fa8d3310facf81f7d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-31 16:07:06 +01:00
Friedemann Kleint 0e5a54f96d Qt Designer/calculatorbuilder example: Remove the form class and its autoconnected slots
The autoconnection feature is considered error-prone and is warned
about by clazy. As this removes the need for a class, remove it entirely
and use a lambda for the slot.

As a drive-by, fix the documentation of the project files.

Pick-to: 6.5 6.4
Task-number: QTBUG-110447
Change-Id: Idf78b58445a3f89399f7ae09065f145428ef83fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-30 08:16:37 +01:00
Friedemann Kleint d3a36cf82e Qt Designer/calculatorform example: Remove autoconnected slots
The autoconnection feature is considered error-prone and is warned
about by clazy.
As a drive-by, fix the documentation of the project files.

Pick-to: 6.5 6.4
Task-number: QTBUG-110447
Change-Id: I7ba1bf47487abadfeaf02fd573eb01d0519a2ffd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-23 21:49:46 +01:00
Friedemann Kleint d1e672c47f Polish the Qt Designer examples
- Use new string literals
- Reorder includes
- Use some auto
- Minor fixes

Pick-to: 6.5 6.4
Fixes: QTBUG-110447
Change-Id: I5af23a662dffb3a01795d1f62c573f854e2ee103
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-23 15:42:44 +01:00
Joerg Bornemann 96f6ea610e Examples: Remove usage of qtNomakeTools from .pro files
This is a left-over from the qmake-based build system of Qt.

Pick-to: 6.5
Change-Id: If3ac9e7b4d623bd509782a7f01b451ea8502041a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-01-18 17:56:45 +01:00
Lucie GérardandJörg Bornemann bf4ab5abd9 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I2df3a8aec11f30f301e3143e9960156b6f45e614
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-25 12:20:31 +00:00
Lucie Gérard 4c7ed31502 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I41a2c9aa6a933a4e3dda5d5b4c70c461912907b2
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-02 11:35:25 +02:00
Lucie Gérard a5bb88c896 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: I5335388c0472b0ee554234fc7eca60769e504660
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-19 12:32:28 +00:00
Kai Köhne 2d267a74c5 Remove .prev_CMakeLists.txt
Amends aeaa9e2a46

Pick-to: 6.3
Change-Id: I4ac5d380b72bb0952ddd8ceb55b262e7e8a4fba7
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-03-22 15:32:28 +01:00
Kai Köhne 1b640ab2aa Improve examples CMakeLists.txt
- 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,
  when unnecessary
- Combine multiple find_package(Qt6 ... calls)
 - use REQUIRED COMPONENTS
 - sort components alphabetically
- Fix wrong indentations
- Use (only) one empty line after multi-line commands

Pick-to: 6.3
Change-Id: If8bf84b498189fa681cfe5128bc8566026dabec0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-19 08:56:49 +01:00
Alexandru Croitor b87c3573c4 Switch examples to build as isolated sub-builds
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: I5ad7541596d39cb089f9af03b8a194b968659910
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-15 11:07:04 +01:00
Alexandru Croitor 6d6a10dff4 CMake: Bump almost all cmake_minimum_required calls to 3.16
Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.

Pick-to: 6.2
Task-number: QTBUG-95018
Change-Id: I1191a6b4b5c13b2b6047a0e2a2ff8c3801f6762b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-09-22 19:37:36 +02:00
Volker Hilsheimer 4f2d4d5ade Fix qdoc warning and broken link
The link to qobject_cast was overly specific, so no link was generated.

Pick-to: 6.1 6.1.0
Change-Id: I74990ee89997a5f91d617db1eb116a2bb3bd4864
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2021-04-13 10:49:19 +02:00
Friedemann Kleint 0d36e0d0e1 Brush up the taskmenuextension example
When porting the code to Python, some issues showed up.

- Rewrite cellRect() to take the position (reason being
  that porting the existing code to Python creates
  problems with implicit conversion to float in the division).
- Use plain assignment by operator[] to replace the characters
  in the string
- Avoid repeating return types.
- Streamline code.
- Initialize myState member variable.
- Indicate C++ in the tool tip

Task-number: PYSIDE-1455
Change-Id: I62fa61eebaa2eefe8db0842d6a3789bd7cd4257e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-03 11:40:00 +01:00
Friedemann Kleint 7f735c198c Qt Designer: Use raw string literals for domXML functions in plugins
This improves readibility.

Change-Id: Id8cffc15ee7fae9cd4a5f51bbf778849b9774226
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-01-06 13:16:45 +01:00
Alexandru Croitor d60ebdda33 CMake: Regenerate examples to set the WIN32_EXECUTABLE property
As well as the MACOSX_BUNDLE properties as necessary.

Task-number: QTBUG-87664
Change-Id: I26917656f6f2b653649765ebbea4e3f348b22ae7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-26 21:20:10 +01:00
Alexandru Croitor 294c917b7e CMake: Regenerate examples to use qt_add_executable
Task-number: QTBUG-87661
Change-Id: I06af51591b79f9432d09b08595f8af021118a6dc
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2020-10-20 09:13:25 +02:00
Friedemann Kleint de3454fcaa Revert "Qt Designer: Migrate from QList to QVector"
This reverts commit ee87edebe6.

The official class name will be QList.

Task-number: QTBUG-84469
Change-Id: Ia6c1f0ed64b3ef3d5b8e0c0435ec76fbe76f867b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-06-08 08:11:08 +00:00
Christophe Giboudeaux adae5d4b7e examples: fix the Designer plugins directory
INSTALL_EXAMPLESDIR shall be used when installing examples.

Change-Id: Ieed06f4376c33a27660f5cf895862d38c52867df
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-04 11:17:39 +02:00
Mårten Nordheim 88f4498759 Port QtTools examples to cmake
Change-Id: I11146959edbec6b4577fdd339d0fcb807f53c95b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-03 17:37:58 +02:00
Liang Qi eeb08eafa1 Fix ambiguous construction from char to QChar
Change-Id: I956c9764ac4e4da24bfd5676433a02159cbfcfdc
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-18 21:05:30 +02:00
Friedemann Kleint ee87edebe6 Qt Designer: Migrate from QList to QVector
Change-Id: I75f6f4b7157616ba86bf520e1936536571a66ba5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-12-09 14:33:45 +01:00
Qt Forward Merge Bot 49c9aa0abb Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ib7e4d5d1f997c67bb68f4c5cb20adb4a5e26f6f5
2019-11-23 03:03:53 +01:00
Friedemann Kleint a842bc95e6 Qt Designer: Clean up the SDK headers
- Use "= default" for constructors/destructors
- Disable copy/move for non-QObject type interfaces and
  add constructors were needed
- Remove duplicated disable copy for QObject type interfaces
- Fix some formatting
- Remove default implementation of
  QDesignerContainerExtension::canAddWidget()/canRemoveWidget()
- Remove Qt 6 fixme comments

Task-number: QTBUG-79896
Change-Id: If9521910c6488c081817e2ccdbf42de578cb16ad
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-11-11 13:11:33 +01:00
Topi Reinio 81c9949541 Doc: Resolve documentation warnings
- QDoc Manual: UIComponents example project has been moved to be a part
  of test case - remove references to it from the manual.

- Add missing image.

- Document the namespace qdesigner_internal as \internal.

Fixes: QTBUG-79833
Change-Id: Ic0984cef4091e794de5e502d04a897b1f532d9d8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-11-11 10:48:58 +00:00
Friedemann Kleint 9da07cc30f Qt Designer Examples: Brush up to C++ 11
Use nullptr, member initialization, QOverload, etc.

Task-number: QTBUG-61184
Change-Id: I45061c506dad72d5f495f480b3e61f4d1c0599d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-06-26 08:52:54 +00:00
Alexander Volkov 98b9480301 Examples: Replace Q_DECL_OVERRIDE by override
Change-Id: I2bed9c0dc1d72005b40ae7a7b75fa22cc67f88c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-12-14 08:22:41 +00:00
Antti KokkoandKai Koehne 4c1d5c0416 Unify license header usage
Updated BSD license.

Change-Id: Ie2521f94a2e8ed423f989e902e5eb88512814f71
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2016-06-10 14:46:48 +00:00
Antti KokkoandKai Koehne 8df59ca007 Unify license header usage
Updated FDL license.

Change-Id: I726ee109b17070d79e19c9edcdba7780aa54b1f1
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2016-06-10 14:46:12 +00:00
Oswald Buddenhagen c9b1b816a2 declare that the designer example installs are ok
installing examples into the proper designer plugin path really is NOT
ok, but we have been doing it for so long now ...

Change-Id: Id422b1664465bb85665391fe2de3b93f973e579a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-28 18:56:14 +00:00
Friedemann Kleint e1520db966 Qt Designer Examples: Remove empty JSON files.
Qt Designer plugins do not require any keywords.

Change-Id: Ifd38bb8ec9b946731010bb64ee02ada474ed42b3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-25 07:11:15 +00:00