Commit Graph

44 Commits

Author SHA1 Message Date
Sami Varanka 6b47b0356d Add QtGraphs demo with CSV-reader
The demo shows how to use an external third-party csv library with
QtGraphs.

Pick-to: 6.10
Task-number: QTBUG-122326
Change-Id: I08dc6c74953fde9dd35c9bf8540ea58234e567f1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-08-14 08:28:02 +03:00
Lauri Pohjanheimo b31598e4e9 Add Qt for Android splashscreen examples
Consists of two Android splash-screen examples.

- qt-splashscreen-in-android: Example app created using app wizard,
AndroidManifest editor and manual editing to provide Qt Splash screen.
This example uses Android Activity to hide Android splash screen.
- qml-splashscreen-in-android: Example app using splash screen defined
in QML. Also this example uses Android Activity to hide Android splash
screen at startup.

Task-number: QTBUG-133683
Task-number: QTBUG-133676
Task-number: QTBUG-133681
Pick-to: 6.10
Change-Id: I2b8421dac3b855123d5a47ffbffe87da172aa6fc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-10 14:50:09 +03:00
Samuli Piippo fc0e5fee24 CMake: add Lingust to optional dependencies
and build documentviewer only if it's available.
Amends change b743a98270.

Change-Id: I70593ca132fdb074db1833536c95ac19d60bf017
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2025-05-19 06:43:28 +00:00
Ville Voutilainen 822137c349 Android: Add Qt Jenny demo
Add Qt Jenny demo that showcases how to generate
C++ headers from Android APIs using Qt Jenny
and how to use the generated headers in Qt Quick
application.

Fixes: QTTA-274
Task-number: QTTA-275
Pick-to: 6.9
Change-Id: Ib36cf0294574d40e2e2ea9d55d5a61d98c3b04de
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-05-16 18:36:49 +03:00
Tim Blechmann aecb99a384 cmake: fix configure error for media player example
The media player example links with Qt::Svg, so we should exclude it if
Qt::Svg is not built.

Pick-to: 6.8 6.9
Change-Id: Ie52fa6fa515a2427834deaa65f3725a6ed9886cb
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-12-16 15:20:12 +08:00
Tor Arne Vestbø a93c15b4ca Add Embedded Windows example
The example showcases window embedding on macOS, Windows, X11 (using
GTK), iOS (and visionOS), and Android, using both Qt Gui, Qt Widgets,
and Qt Quick.

Pick-to: 6.8 6.8.0
Change-Id: Iaa61eb3556ce2293371a3e127906378ac077c553
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-09-18 00:04:13 +02:00
Kai Köhne fbeb4ef0b3 Disable CarRendering example on Yocto (2nd try)
Do not try to automatically detect Yocto. Instead, check whether the
user has set QT_ALLOW_DOWNLOAD. This is not yet set anywhere in the
CI, but we'll enable it in selected configurations.

Pick-to: 6.8
Fixes: QTBUG-128729
Change-Id: I5ac7d6b3ad58aab925e9168af809e9c7d800bffd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit e87f435825)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-17 08:13:25 +00:00
Sadegh Taghavi a800651471 XR physics-base Teleportation demo
This demo shows how to navigate and interact with objects
in the virtual environment using physics-affected locomotion.

Pick-to: 6.8 6.8.0
Change-Id: Iff6e0f2801e8f603f8a2019aea9c89087de5ed0e
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-09-16 11:36:58 +00:00
Kai Köhne 27f3789316 Disable CarRendering example on Yocto
Car Rendering example relies on CMake's FetchContent to fetch
the Qt Design Studio Components it's using. But for a normal
BitBake/Yocto build, FetchContent is disabled, and will result
in weird configure errors.

The patch detects a Yocto build by checking for the BBPATH
environment variable. If set, the QT_EXAMPLES_WITH_FETCHCONTENT
cache variable is set to false, and the Car Rendering example
will be excluded from the build.

Pick-to: 6.8 6.8.0
Fixes: QTBUG-128729
Change-Id: I17783aff00f996f6c35fc1b73d69ef355c14c2ee
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2024-09-11 09:41:10 +00:00
Kai Köhne d7a629e95f Fix compilation of car-configurator with older CMake versions
Car-configurator actually only needs CMake 3.20 - older versions
will fail with

  CMake Error at C:/Qt/6.8.0/msvc2022_64/lib/cmake/Qt6Qml/
  Qt6QmlMacros.cmake:4141 (message):
  QML app deployment requires CMake version 3.19, or later, or manual
  executable finalization.  For manual finalization, pass the
  MANUAL_FINALIZATION option to qt_add_executable() and then call
  qt_finalize_target(CarRenderingApp) just before

But CMake 3.20 should be enough. As Qt still allows to be configured
with CMake 3.16, don't build the example for older CMake versions.

Pick-to: 6.8 6.8.0
Fixes: QTBUG-127851
Change-Id: I157a625294de0896a39f3ab8f057a95d627d3c7c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-11 09:41:08 +00:00
Ali Kianian 2daf92a628 CarRendering: Use Qml Asset Downloader library
Task-number: QTBUG-126535
Pick-to: 6.8
Change-Id: Ia0c077507df2048e292953040fe6752a7bc4481a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-07-02 12:30:29 +03:00
Lucie Gérard 8b36425fab Correct build system file license under example
According to QUIP-18 [1] all files under examples
should be licensed
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: Ia2e8f62af64a384196a9b0c02ac5b2fbf5404a8b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 08:20:16 +01:00
Axel Spoerl 54d105b901 Don't build documentviewer demo on Android
The demo crashes on Android with a nullptr dereference, because it fails
to locate any plugins. The reason is currently under investigation, and
probably related to an issue in the Android content file.

Prevent documentviewer from being built on Android.

Task-number: QTBUG-122041
Pick-to: 6.7
Change-Id: I810bf9787df4d4105c5d11e36f27d0bbe61b8d3d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-16 06:34:14 +01:00
Alexey Edelev 3a3cb92b9b Add the missing check for Qt6::Positioning presence
osmbuildings requires Qt6::Positioning which shouldn't trigger a configure
issue when building qtdoc repo without QtPositioning module. The example
should be skipped instead.

Amends 180704c87c

Change-Id: I74f8010db5b6a1591f04e725a2f0711e5990f066
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-01-31 14:37:50 +01:00
Samuli Piippo 6f0c2b21ca CMake: Add components needed by demos
Demos want to use more Qt modules, try to find all of them.

Pick-to: 6.7
Change-Id: I478a8dc7accdadd1c521f50491326e978f644f18
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
2024-01-25 15:13:25 +02:00
Sadegh Taghavi 180704c87c OSM Buildings Demo
It's a demonstration of using qtQuick3d to load and render big scene

Change-Id: Ie9065bd71f69f622f07c3bf78520cfbea0b2ce8b
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2024-01-18 15:39:32 +02:00
MohammadHossein Qanbari 7570109747 Lightning Viewer Example: Improve Warning Message
The warning message is updated to cover the whole conditions.

Fixes: QTBUG-120482
Pick-to: 6.7
Change-Id: Ia11baf481510520dd250412d382616b9b25a8ac0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-01-08 16:14:44 +01:00
MohammadHossein Qanbari 60cf689c6a Examples: Add LightningViewer (V1)
Implemented lightning viewer example using a web socket connection to
an AWS gateway for real-time lightning data visualization worldwide.
Supports both landscape and portrait modes for optimal screen
presentation. Added diverse map layers, including live data and
distance-time layers. Added functionality to toggle between different
map types. The lv_style is auto-generated using figma-style-generator
tool based on specified design requirements (see the task description
and comments for more details).

Fixes: QTBUG-116750
Pick-to: 6.7
Change-Id: I2507c9b030cb0c91d1a7cf51267770735a35419b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-23 00:07:03 +01:00
Sakaria Pouke 08d2700a81 Overhaul StocQt example
Implementing a new design and implementation for the StocQt example.
The new example uses Qt's REST API and json parser to read live stock
data.

Fixes: QTBUG-116593
Fixes: QTBUG-116594
Pick-to: 6.7
Change-Id: I2b491673bd7c9acb7812f88c508f42ad9cc9f869
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-12-22 20:40:50 +01:00
Kai Köhne c31ad31f02 Doc: Remove tweetsearch example
The documentation for the example was disabled since commit
012384be6a (6.0), so the example was little used. It also
requires a Twitter developer account, which costs at least
100$ / month (https://developer.twitter.com/en/docs/twitter-api).
So probably not worth to keep the example.

Change-Id: I75e4a67a5525d49e9857703d5932081d697a68a6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2023-12-03 10:38:23 +01:00
Mahmoud Badri fc8b38547b Add car-configurator demo
Fixes: QDS-10742
Change-Id: I3d9caf71039a9830595c97e7d944739beb81ab23
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-24 16:14:56 +02:00
Nicholas Bennett 62b33327c0 Dice Demo: Add sound effects and shake to roll
Added the features in line with the spike outcome.
In addition, I modified the spawnDice function to
estimate if all dice are at rest before enabling spawning.
This prevents duplicate shake events and double tap
fumbles.

Task-number: QTBUG-116491
Pick-to: 6.6
Change-Id: Ia0dc59e469e008da5fc3afe2a7342381eadc1008
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-02 03:40:04 +00:00
Kai Köhne 0183fa1a97 Build FX_Material_Showroom example again
Revert removal of the example from the default built that was done in
3f9c25bdb7 8941da8b40. Use different names for the clashing CMake
targets.

Pick-to: 6.5 6.6
Change-Id: Ife9b796fa416091505acfd9b5f59cc4ea6ab93f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-22 12:27:35 +02:00
Jonas Karlsson 34ecd60038 Add the 'dice' example
Fixes: QTBUG-113600
Pick-to: 6.5 6.5.2 6.6
Change-Id: I13b8327f2dcf3e7eaec80c7c10038b22a1656df3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-06-21 00:50:04 +02:00
Kamil Hajdukiewicz 3f9c25bdb7 Revamp Thermostat example 2
The new responsive design of Thermostat Example is implemented.
The application is prepared to look good on desktop, mobile and small displays.

In the current state only part of the application is prepared.
Schedule View is not ready.

What is done:
1. Rooms View
2. Thermostat Control View
3. Statistics View
4. Dark/Light mode

Pick-to: 6.5.2 6.5 6.6
Change-Id: I52d07b7001b1f78025d74ab827e58b5d23b2dedb
Reviewed-by: <kaj@spyro-soft.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-06-20 12:48:37 +02:00
Mahmoud Badri c77719ff5d Add FX & Material showroom demo
Fixes: QTBUG-113477
Pick-to: 6.5.2
Change-Id: I2cdd68027224516b6e6ddacad99d06b6a4dc1ba0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-06-19 15:15:11 +03:00
Kimmo Leppälä 7c15387604 Fix Calqlatr example to follow Qt6 example guideline
Set basic style for the application to get rid of "The current style
does not support customization of this control" warning in
CalculatorButton.qml.

Task-number: QTBUG-108751
Pick-to: 6.5 6.6
Change-Id: Id9b8305238404088fd24d4e128a753728558f10a
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-13 10:22:15 +03:00
Qt Submodule Update Bot 3388603fb6 Refresh 'ToDoList' example
The whole design of the example was changed.
The app was created in Qt DesignStudio.
Some new functionalities were implemented eg. calendar, clock.
The application will use "https://www.boredapi.com" to get random tasks.
It will also use local storage for saving list.

Tested on Android, Windows, macOS, iOS.

Change-Id: Ieb688d4a4606b4617b63342b749099528021054c
Pick-to: 6.5 6.6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-09 17:58:43 +02:00
Kamil Hajdukiewicz d7554ab700 Refresh the 'Multimedia Player' example
Design of MultimediaPlayer example was refreshed.
New icons, colors, application structure were provided.
Some new functionalities were introduced to the sample:
playlist, shuffle, loop, dark mode.

Tested on Windows, Android Emulator, macOs, iOS emulator.

Change-Id: I38a8e203021edc97b70a4ab8f0d8d83c6d5ae45b
Pick-to: 6.5 6.6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-08 03:08:54 +02:00
Kimmo Leppälä 117382f261 Remove PhotoViewer example
Fixes: QTBUG-113593
Change-Id: Idafd79a140067fac9c9f27440f4f43453e2e2ddf
Pick-to: 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-16 20:27:36 +03:00
Kimmo Leppälä 02efcba73d Move robotarm example from quick3d to qtdoc
Pick-to: 6.5
Change-Id: Iac113bc7ed773f291ef09ebe144e1de1e0e58136
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-05-09 18:37:33 +02:00
Kai Köhne 835f15cfbb Use versioned CMake targets for Qt modules
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: I9bc7963d8524ef2ab061e32aef428711646247a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-02 12:03:42 +00:00
Axel Spoerl ba61af0bf3 Migrate documentviewer example into plugin based architecture
This patch changes the document viewer example to a plugin based
architecture.
It adapts the documentation accordingly.

Change-Id: Ia24028aa27e21fb8ab36f5ef3a9953be60858b19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-02 10:11:06 +02:00
Shawn Rutledge 527896dc3d Build the photosurface demo only with Quick + QSB + PDF
We need qsb for the background shader, and the PDF image format for the
intro slides.

Task-number: QTBUG-108924
Change-Id: I6e4d8467730ad0691e71d08c8d456bf2d071f984
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-23 15:27:40 +01:00
Axel Spoerl 9bba48e1ca Add Json, text and pdf document viewer demo
Add a demo with a combined viewer for Json, pdf and text documents.
The example demonstrates how to create an application, utilizing
a main window with static and dynamic toolbars, menus and actions.

Type specific viewers inherit from an abstract viewer class.
The Json viewer implements an abstract tree model for QJsonDocument.

The example demonstrates a few useful application features, implemented
with QtWidgets and QSettings, to (re)store properties:
- Detecting file content types with QMimeDatabase
- Changing and restoring override cursor when hovering over a widget.
- Basic printing support.

Pick-to: 6.5 6.5.0
Change-Id: Ie411669cfdbc41ac399cd1aed87e60722195c42c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-09 11:55:22 +01:00
Juha Vuolle 80f9a83d90 Colorpalette HTTP REST client example
Replace the addressbook client example with a colorpalette client.
The corresponding addressbook server has been superseded by a
colorpalette server.

The client can interface the local QHttpServer colorpaletteserver
example as well as the publicly accessible reqres.in. Please note
that the reqres.in is stateless service, and eg. adding/updating colors
will have no actual effect.

Task-number: QTBUG-106041
Pick-to: 6.5
Change-Id: I4ea06bbcd9b32900a661f19e0abe0629275aaef1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-02-14 11:57:19 +02:00
Lucie Gérard d490baa159 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Iec124e0bceb4335370674a222970cd9c1b90763f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 10:01:38 +02:00
Lucie Gérard 37540e46fb 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: I9499ba4c20f610ffe8af0fc3e29e6581247f2c40
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-07 14:45:33 +02:00
Kai Köhne 3dae1461ac Examples: Improve CMakeLists.txt files
Pick-to: 6.2 6.3
Change-Id: I7582f6c1b9daacaf694355269663b1d6616e0c05
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-20 18:05:52 +01:00
Alexandru Croitor 641005128e Switch examples to build as isolated sub-builds
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: I3e7b6dfa84573f2ae07fe5be8540618d1a93f695
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-15 11:09:19 +01:00
Jani Korteniemi 2eff5e4314 Add QtPurchasing module as an example under Qt demos
QtPurchasing module is deprecated in Qt6. However, the purchasing
code is moved as example/demo under qtdoc to demonstrate the use of
in-app purchases in Android/iOS.

The demo is under demos\hangman.

Few fixes done to the original code:
* Ported the code to Qt 6.
* Removed reinterpret_casts and QQmlListPropertys.
* Fixed few QML warnings.
* Added documentation
	* Fixed documentation
* Added CMake port
	* Fixed Cmake for iOS
* Modified Fonts in qml file
* project name changed from qthangmanpurchasing to hangman

Task-number: QTBUG-84776
Pick-to: 6.2
Change-Id: I86051b29d54cfb4a48b310ebc8d538c806fbf8da
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-11-10 13:46:03 +02:00
Ivan Solovev 49073d33f1 Update examples to use XmlListModel from QtDeclarative
Now when the XmlListModel is a part of QtDeclarative, we
can udpate the examples, which were using the model.

This patch introduces the following changes:
- Uses XmlListModel from QtDeclarative, removes the custom
implementation from shared subdir.
- Improves photoviewer and rssnew examples to get rid of
some qml and C++ warnings and deprecation notifications.
- Updates the documentation for photoviewer and rssnew
examples to reflect the usage of the XmlListModel from
QtDeclarative.
- Enables documentation build for rssnews example

Task-number: QTBUG-89817
Change-Id: If3736a18070dc19492058f7c184d5c9cfab74663
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-16 04:23:24 +01:00
Doris Verria 3ffb914ae1 Remove qtxmlpatterns dependency from CMakeLists.txt and .pro files
Adjust .pro and CmakeLists.txt files of the demos according to the latest changes of the photoviewer and rssnews demos.

Fixes: QTBUG-87444
Change-Id: I4b8a33d6e92c69e5524ad1d26b61b7fdaa430e45
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-05 22:26:52 +01:00
Venugopal Shivashankar de6cc8c379 CMake: Port the build setup to CMake
Fixes: QTBUG-83910
Change-Id: If0ebd9d0b528cd84ffe92955b7d1c4d580d397fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-04 23:00:45 +02:00