Commit Graph

551 Commits

Author SHA1 Message Date
Kai Köhne 6a8afb8277 calqlatr: Remove the code snippet from inside BackspaceButton
The shown code snippet from BackspaceButton.qml is a bit arbitrary?
Better to just leave it out (we don't show content from
CalculatorButton.qml either).

Pick-to: 6.10
Task-number: QTBUG-137892
Change-Id: I9c70c8ccf5134a710a25294ab8ef802890b53c02
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2025-07-04 16:55:05 +02:00
Morten Sørvig 5eaaee105a Don't use static QLocale instance
Avoid creating and initializing the QLocale instance
in a global constructor. This is generally not recommended
for non-constinit types, and additionally causes a crash
on WebAssembly in the QLocale backend implementation.

Pick-to: 6.10
Change-Id: I720c60bf89d39434022f61e8d71de7b4e8610d8e
Reviewed-by: Masoud Jami <masoud.jami@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2025-07-03 16:15:42 +02:00
Friedemann Kleint a810615dd0 documentviewer demo: Fix resource warnings
Reverts the removal of set(CMAKE_AUTORCC ON) by
600dfd439f, fixing:

qt.svg: Cannot open file ':/demos/documentviewer/images/go-next.svgz'

Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-138169
Change-Id: I11615ebee7ee4aa54e473aec0a2f9a15ab664ef2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-07-02 22:49:12 +02:00
Kai Köhne 1aae1df0fc Doc: Move 'Window Embedding' example to UI Components category
It's not so much an application as a technology demo.

Also, add "Example" to the title, as it otherwise might conflict
with sections of the same title, like platform-integration.html#window-embedding

Pick-to: 6.10
Task-number: QTBUG-137988
Change-Id: I182eff777a5966920ee9a77ec709f8e0a25bae97
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-07-02 14:58:43 +02:00
Kai Köhne 72ae3cf22f calqlatr: Improve documentation metadata
Make sure that the example is also shown when one searches for 'calculator'.
Also add ios and android as tags.

Pick-to: 6.10
Task-number: QTBUG-137892
Change-Id: Ib29d141edd8cd3dd65d67040e1adec0aa1858175
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2025-06-30 11:22:28 +02:00
Kai Köhne 66e862d1ac calqlatr: Fix shown code snippet
The \skipto Text is meant to navigate to the line

    contentItem: Text {

Anyhow, it already stopped at

   function getTextColor() {

Make sure that this won't happen by making the text more explicit.

Pick-to: 6.10
Task-number: QTBUG-137892
Change-Id: Ia29d953528b1765c30f8d3550556c5460e48e5d4
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2025-06-30 11:22:20 +02:00
Kai Köhne f47c18d6b1 calqlatr: Reformat .qml files
Do use qmlformat to make sure that the .qml files in
the example are uniform. Just leave out some changes that
make lines like

      case Qt.Key_0: digitPressed("0"); break;

unneccessarily long.

Store the restriction to 100chars in a .qmlformat.ini file
for other examples.

Pick-to: 6.10
Change-Id: I3f77efa83b2d5e01f1497687763e5c327da71ff2
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2025-06-30 11:22:15 +02:00
Nicholas Bennett 9e0c0576af Fix QtJenny Demo not calling Gradle during CMake config
Added a condition and method for calling Gradle the "Windows" way on
Windows hosts.

Fixes: QTTA-401
Pick-to: 6.10 6.9
Change-Id: Ic7b102fb7898cb41a8802ac6f90050179142554f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2025-06-26 11:35:23 +00:00
Kai Köhne 34baaf650b calqlatr: Tweak metadata for macOS
Set up a unique bundle identifier, and make sure that the app bundle
and executable is written with uppercase first letter, as it is most
common with native applications.

Pick-to: 6.10
Change-Id: Iab670446f5eb9f50e245c1b80149717c37a87096
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-25 17:55:21 +02:00
Kai Köhne 6c59821836 calqlatr: Drop 'example' from target name
There is no reason to name the target different from the project.

Pick-to: 6.9 6.10
Change-Id: Ice1ecc83c86a94cd60d7a77b6113434c34275f54
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-25 17:55:21 +02:00
Kai Köhne bbd6f57ebd Remove QtJenny example from App Examples category
This is not an actual application, and already shown
in Mobile category.

Pick-to: 6.9 6.10
Task-number: QTBUG-137988
Change-Id: I3efa4766b51d14c94809ec3c77c95d8f26ba469d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2025-06-25 08:48:07 +00:00
Kai Köhne b9c0da70a6 Remove 'Qt Quick Demo - RESTful API client' from App Examples category
Pick-to: 6.10
Task-number: QTBUG-137988
Change-Id: Iaf8e52c42d5829bac86e4374bd83be6c69b33d18
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2025-06-24 10:37:59 +02:00
Ville Voutilainen 3cbae0c07b Add more content to the Qt Jenny documentation
Pick-to: 6.9 6.10
Task-number: QTTA-230
Change-Id: I2bc3aa4fa75d73fad5fc19b1cf59e8caa3fc9e4a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-19 08:27:41 +00:00
Alexey Edelev de59c40a39 Fix name clash in Hangman and Maroon demos
In Unix-like OS name of executable clashes with QML module directory
name. It's better to avoid using QML module URI same as executable
name. Prepend "examples." to the QML URI in this case.

Pick-to: 6.8 6.9 6.10
Fixes: QTBUG-133792
Change-Id: Iaf87117f0d9212b609596ff8c697b909f9bd1809
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-06-11 07:22:47 +00: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
Owais Akhtar 9e28064c72 Update calqlatr qmlproject file
Fixes: QTBUG-135305
Change-Id: I9a42614f4730398c5ca103514869a07945b92253
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-06-03 07:00:09 +00:00
Dheerendra Purohit 303c85a782 Use QML_ELEMENT macro instead of qmlRegister* for mediaplayer
Updated the MediaPlayer example to use compile-time QML registration via
the QML_ELEMENT macros instead of qmlRegisterSingletonType. This aligns
the example with modern Qt 6 best practices and improves startup
performance and tooling integration.

Pick-to: 6.9 6.8
Task-number: QTBUG-136712
Change-Id: Id34670f4d45200b9a1424612f5a05bebead0a60e
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2025-05-30 10:16:03 +05:30
Dheerendra Purohit 7d1a2ae694 Use QML_ELEMENT macro instead of qmlRegister* for stocqt-example
Updated the stocqt example to use compile-time QML registration via the
QML_ELEMENT macro instead of qmlRegisterSingletonType. This brings the
example in line with modern Qt 6 best practices and improves startup
performance and tooling support.

Pick-to: 6.9 6.8
Task-number: QTBUG-136712
Change-Id: Ifd2dbbebb9a770faf85340bae9aec624ea06d5a9
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2025-05-24 20:30:30 +05:30
Konsta Alajärvi 805311c7d2 Add documentation for qtjennydemo
Add documentation for qtjennydemo, includes one .qdoc file
and a .png overview image of the application.

Fixes: QTTA-341
Pick-to: 6.9
Change-Id: I026d76932744e7fc5c89d6c5954572483eb6a440
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-05-22 11:12:13 +00:00
Kai Köhne 46aa07165f documentviewer: Make q3dviewer path capitalized
This fixes a cmake warning that the output path does not match

     The Q3DViewerModule target is a QML module with target path Q3DViewer.  It
     uses an OUTPUT_DIRECTORY of
     $HOME/dev/qt/dev/src/qtdoc/examples/demos/documentviewer/build/Qt_6_10_0_build-Debug/plugins/q3dviewer,
     which should end in the same target path, but doesn't.  Tooling such as
     qmllint may not work correctly.

Pick-to: 6.9
Change-Id: I33e402a52e3ee5747da428b9a74121e35345f63d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-05-19 11:34:04 +02:00
Juha Vuolle 01a5299453 Add api-key hearer to colorpaletteclient example
Colorpaletteclient is able to interface two server backends: public
reqres.in service and QHttpServer example service. The public reqres.in
service has recently started requiring an api-key HTTP header (see
https://reqres.in/signup).

This commit adds an api-key header if the app uses the public
reqres.in service. The header is added to the QNetworkRequestFactory
and is consequently then used in all subsequent requests.

The code is furthermore  adjusted so that it won't accidentally
remove the api-key when toggling another proprietary header ("token").

Pick-to: 6.9 6.8
Fixes: QTBUG-136790
Change-Id: Id19d223722fd8f735d76855a293bc77f680ed344
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-05-19 11:05:18 +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
Rami Potinkara 0a3912dcb2 Android: Enable QML debugging in non-release builds
This patch
-enables qmltooling in non release builds
-this will allow QML debugging to start and work
-this patch will do this to following examples:
   -calqlatr, coffee machine and dice

Task-number: QTBUG-136794
Pick-to: 6.9 6.8
Change-Id: I4699285fa20021ec9d6e29c86a7a16516af085fa
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-05-16 18:36:49 +03:00
Jani Korteniemi 4316292c25 Fix Hangman example not compailing on Android
Include QTimeZone in androidjni.cpp.
Amends commit c0562d08fa

Pick-to: 6.9.0 6.9 6.8
Fixes: QTBUG-136482
Change-Id: I311202cd91085367daf0826bb6927938853bef99
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2025-05-15 20:22:08 +00:00
Kai Köhne 8ccc066721 documentviewer: Simplify qt_add_translation setup
* Define i18n languages centrally
* Use canonical :/i18n directory (default)

Change-Id: I7e8d9c57512418c51843464622ec270dea1b3456
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-05-15 09:50:55 +02:00
Masoud Jami b743a98270 qtdoc: Extend documentviewer demo to use translations
This patch extends the documentviewer demo to use
text based translation for English and German, as follows:

- Add AbstractView::addTranslation(fileName) for inheriting
  plugin classes to optionally load own translations.

- Implement runtime translation switching. Provide option for
  plugins to benefit, if they implement their own runtime
  switching functionality.

Task-number: QTBUG-71856
Change-Id: Ic7782b7fa38d1121b140351f5eaa88ac027a6bcd
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2025-05-15 09:50:51 +02:00
Kai Köhne c332d8321a Revert "Download assets from master.qt.io not download.qt.io due to CORS"
This reverts commit c35da8e952.

This considerably slows down downloads from Asia. Also, the original
reason to care about COARS was multi-threaded WebAssembly, but we're
using single-threaded WebAssembly for now.

Task-number: QTBUG-129105
Change-Id: Ia7aeb265b095337c2da732f1c6ce682026c57c55
Pick-to: 6.9
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-04-29 11:58:17 +00:00
Masoud Jami 600dfd439f qtdoc: Fix loading svg icons and txtviewer plugin in documentviewer demo
Apply a couple of fixes to load icons correctly and preventing seg fault
in loading txt files in the documentviewer demo.

Change-Id: I5c3e8694abe37140d73da8b40204bc05aaf37e9c
Pick-to: 6.9 6.8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-04-23 10:54:29 +00:00
Matthias Rauter 9f91454fe6 Adjust delegate width to fit the URL in colorpalette
The server URLs got an additional /API path and they didn't fit into the
delegates anymore. This patch increases the delegate width so it looks
nice again. This is not the best solution. A dynamic solution would be
better but also a bit too complicated for an example.

Amends 6a6212a652.

Pick-to: 6.9 6.8
Change-Id: Iead827d4e37b5e0494f7f35c95934b8bf848cb40
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2025-04-17 23:28:08 +02:00
Juha Vuolle 19040296e4 Include qrestaccessmanager.h with QtNetwork prefix
Use include style that is consistent with rest of the
application. The include style was a leftover from the times the
application itself defined "restaccessmanager.h". Since Qt 6.7
the qrestaccessmanager.h is a proper QtNetwork class header.

Pick-to: 6.9 6.8
Change-Id: I25c1103ed9ccef1aa1da86475a1e20d9dba76a3b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2025-04-17 07:41:33 +03:00
Juha Vuolle 3ab7b6eb02 Link colorpaletteclient example against Qt::Network
The application uses QtNetwork classes and should link against it
accordingly. This missing linkage doesn't cause problems for most
users because QtNetwork is usually transitively linked through other
modules.

But understandably relying on transitive linkage is not acceptable.
This became a problem when disabling QML networking
(-no-feature-qml-network) => Qt::Network classes no longer available.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-136036
Change-Id: Id2f1348551f77c5139b514bce95d97f8c8e38f67
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2025-04-17 07:41:30 +03:00
Andreas Eliasson 88402b3062 Doc: Prevent main content from overflowing Contents side section
Having a \table with 3 \inlineimages on each row is prone to cause
overflow issues on narrower screen widths. Listing the three groups
of \inlineimages together with a \section1 and a \br is more dynamic
and will wrap the images as the screen width changes.

Fixes: QTBUG-134789
Pick-to: 6.9 6.8 6.5
Change-Id: Id05df222fea226e602a74b57bef0bce0a55b86a3
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2025-04-07 10:53:12 +00:00
Andreas Eliasson 42cab48b04 Doc: Add tags to Lightning Viewer example
Fixes: QTBUG-135289
Pick-to: 6.9 6.8
Change-Id: I61dd5ee949f97917d65bfccf536a15cfa0a4a353
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2025-04-02 18:34:38 +02:00
Edward Welbourne c0562d08fa Convert example to QTimeZone's setTimeZone() from setTimeSpec()
The latter is deprecated now, don't encourage further use of it.

Pick-to: 6.9.0 6.9 6.8
Change-Id: I41b00cb9365fa7b86c2524cc888526a74413e4ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-28 13:42:22 +01:00
Morten Sørvig 4c9f150c9b Add windowembedding wasm test case
This uses the "Cally" JS calendar component as the
native window, since the built in calendar input displays
the calendar as a popup and not on the input element
itself.

The native calendar element is created from JavaScript,
ownership is then passed to emscripten::val on the C++
side:

   element -> EM_VAL -> emscripten::val

Alternatively, the calendar could also have been created
from C++ using code like

   val calendar = val::global("document").call<val>("createElement", std::string("calendar-date"));
   calendar["innerHTML"] = std::string("<calendar-month></calendar-month>");

We create a copy of the calendar val on the heap in order
to be able to pass a pointer to fromWinId() which does not
become stale when the function returns.

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Ib68e82f01dc1c489b847b794aa09d6ccc9986157
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-03-26 14:59:04 +01:00
Soheil Armin 48edb006a9 Dice: Improve initial position of dices
This change ensures proper initial distance of dices based
on their size. It also distributes them horizontally so that
they hit each other later at different angles.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I7f8d2ab0c9b7b6b00996cae8fb121de950b68ca4
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-03-24 10:53:25 +00:00
Soheil Armin f8da375cf9 Dice: Set realistic values of PhysicsMaterial of dice
These new values better matches to a acrylic D6 dice
material.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I120f35815ffdcb1af56cc5505b752ca356bd61c0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-24 09:13:01 +00:00
Soheil Armin 4712e40925 Dice: Replace SoundEffect with MediaPlayer
Although the SoundEffect type has lower latency, it is
more resource intensive and shows lower performance and
makes the UI stuttering in some desktop or mobile target
devices.

In this change, we replace SoundEffect with MediaPlayer to
get better visual performance.

Pick-to: 6.8 6.9 6.9.0
Change-Id: Ib5f4d8fe6efb726e341481af9a3aaf2d1f4f1515
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-24 09:12:59 +00:00
Soheil Armin f865c01f0a Dice: Hide menu button when drawer is shown
Pick-to: 6.8 6.9 6.9.0
Change-Id: I17f4e81f9821bd413fd7d1a24cf43cf0ff0f93c9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-24 09:12:53 +00:00
Soheil Armin a7c2e00368 Dice: Improve shake detection
This change enhances the readability of the code and improves the
behavior of triggering a roll. It adds a small delay to prevent
multiple rolls from occurring in short intervals.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I657450be50742d9b6236e2c29cf365b04349f191
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-03-24 09:12:43 +00:00
Soheil Armin a15fe391af Dice: Show values of sliders in front of related Labels
The user could not see actual values that are set with
sliders. This change appends those values to their related
labels.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I0683a2765368e8385e103639695f7f337902e996
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-20 18:52:06 +02:00
Soheil Armin a9ac96fe36 Dice: Remove redundant RowLayouts with one item inside
Pick-to: 6.8 6.9 6.9.0
Change-Id: Ib10806101288af892ed4040d596ab36a3af04dc7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-20 18:52:00 +02:00
Soheil Armin 630a817385 Dice: Improve tapLabel disappearing logic
This removes the hide() function and the manual animation
from the tapLabel and uses Behavior as an alternative.

Pick-to: 6.8 6.9 6.9.0
Change-Id: Ib4cb924ff1ac3dce70dfde3a80e00efa39a5799a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-20 18:51:56 +02:00
Soheil Armin d4752094b4 Dice: Fix cameraController stealing drawer flickable gestures
The OrbitCameraController inside the Scene, steals gestures from
the Flickable inside the drawer.

This change disables the camera controller when drawer is shown.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I557f1196db0da2d1b30ddbfbe804585de2519f1a
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-03-20 18:51:53 +02:00
Soheil Armin 015e19ce0d Dice: Replace forEach() with reduce() to calculate dice sound volume
Pick-to: 6.8 6.9 6.9.0
Change-Id: I1411176d718d5219a42a12c4334d8d6d89b88a8a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-03-20 18:51:49 +02:00
Soheil Armin 65937d3bc8 Dice: Improve atRest property of PhysicalDie
atRest property should be true while the motionTimeout timer
is running.

This change remove a function binding and directly aliases the
atRest property to running property of the timer.

TODO: atRest is unused based on a previous change. If we decide
to keep the logic in the previous patch, then we can remove
this timer and also the property.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I9d0c58f192251621cb3e691cf431366eb6b1dd68
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-03-20 18:51:46 +02:00
Soheil Armin fc4f30767e Dice: Improve DiceSpawner and its property bindings
This change replaces the imperative logic of DiceSpawner
with a more declarative approach using Repeater3D.

It also replaces sending properties via functions, with
property binding and property aliases.

Pick-to: 6.8 6.9 6.9.0
Change-Id: Ic5c166fb50b0ede393cc72411f1a4a7e08a6ccd7
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-03-20 18:51:37 +02:00
Soheil Armin ec48a83d72 Dice: Replace the DirectionalLight with a PointLight
DirectionalLight shows performance issues on some targets.
We can achieve a similar visual result with a PointLight.

Pick-to: 6.8 6.9 6.9.0
Change-Id: I39708d2179782f8643ede39e970f47337cae507f
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-03-20 18:51:34 +02:00
Mahmoud Badri aeb2f7e971 Remove unused assets from FX & Material showroom demo
Remove 30 unused images which reduced the downloaded assets count from
99 to 69 and saved unnecessary many megabytes of download.

Change-Id: If249bb476e50c9b6e4cb9ac35884a982a0558ba1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-03-19 23:12:33 +02:00
Mahmoud Badri aa346736b3 Remove warnings from FX & Material showroom demo
Update "Connections" nodes to use the modern
style handlers which removes many warnings.

Change-Id: Idc8b03cdfd6b686e85ba9cd8e9f86e0c94ffdfa8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-03-19 23:12:17 +02:00
Soheil Armin bd684f7871 CarRendering: Remove redundant _Desert1 texture
The _Desert1 uses a .hdr source. A version with .ktx source is
already available.

This change removes _Desert1 and replaces it with _Desert.

Fixes: QTBUG-132704
Pick-to: 6.9 6.9.0 6.8
Change-Id: Ie22b02379f7f83082a7aa58fa04fffbc0e9c4ece
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2025-03-03 13:11:58 +02:00
Friedemann Kleint 09bc4a6861 documentviewer: Add simple image viewer
Since qtbase/b8f588bea74aae0a890e1af18b936b0bfbf8c237
removed the QtWidgets image viewer example, there
is no way to exercise the image plugins.
Re-add the code as documentviewer plugin.

Pick-to: 6.9
Change-Id: I0eb26d02a9c11cdb0fce315ffc6f7c662e98c924
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-01-24 17:29:41 +01:00
Assam Boudjelthia c2c840647a Android: set QT_ANDROID_TARGET_SDK_VERSION to 34
Setting this to 35 is not going to work properly as edge-to-edge is not
working properly yet in Qt for Android 15.

See https://developer.android.com/develop/ui/views/layout/edge-to-edge

Fixes: QTBUG-132360
Pick-to: 6.9 6.8
Change-Id: I46020d07e3aea59d57ebf1bef1b25f1f90971827
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
2025-01-24 13:13:17 +00:00
Joerg Bornemann 663141e2ee CMake: Fix CMake warnings in txtviewer plugin example
The txtviewer plugin example is part of the documentviewer example but
at the same time a separate example with its own documentation page.
That means it appears on Qt Creator's Welcome Page and must be buildable
standalone.

Add the usual CMake stanza for standalone projects to the top of the
project file.

Pick-to: 6.8 6.9
Task-number: QTBUG-132738
Change-Id: Ib5aad765ec5dbc2406df6b1cca574a20448f6529
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-01-23 16:03:22 +01:00
Ali Kianian a82d7f2617 CarRenderingApp: Shrink the build directory on windows
* Also shrink the plugin names

This patch forces a shorter build directory as a solution to maximum
path issue on windwos.

Fixes: QTBUG-132551
Change-Id: I06ea6ac987e2341fd12f972f29625fca122de1f4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-01-15 12:23:30 +02:00
Tim Blechmann 4188e03f20 CMake: silence QTP0004 warnings
Configuring the examples will emit QTP0004 warnings. Setting them by
increasing the minimum version for qt_standard_project_setup.

Pick-to: 6.8 6.9
Change-Id: Iefaad04f4ea098d7ba942ce4ae38f29971b574c6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-01-02 20:58:51 +08:00
Tim Blechmann 055fa62010 demos: qmake compile fix
xr_physicsbase_teleportation is included by demos.pro, but does not have
a qmake build system. This causes compile errors when the denpendencies
are available.

Remove it.

Pick-to: 6.8 6.9
Change-Id: I55c488608ff4bdc7a2ce8223d27ce8a1d7d28fe4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-12-19 08:14:07 +00: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
Jonas Karlsson 0365c031cf Dice app: Disable camera panning
There is no point in being able to make the camera not focused on the
table since there is nothing else to see in the example.

Change-Id: I6fc0df5619080165ea147ce870065b2cae12e371
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-12-05 10:49:36 +00:00
Patryk Stachniak 9467d3cf5d Improve animation smoothness in Robot Arm Example
Changed the easing curve to QEasingCurve::Linear to improve smoothness.
Updated setValue() to prevent restarting the animation unnecessarily if
the new value matches the current target. This change enhances the user
experience by reducing visual jitter and improving animation flow.

Task-number: QTBUG-130307
Pick-to: 6.8
Change-Id: Idd05f17d14a0a653a24a083ad421c3fe0418c3c9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-12-02 13:40:15 +01:00
Friedemann Kleint 88caeb3837 documentviewer demo: Fix edit actions
Use modern theme icons

Pick-to: 6.8
Change-Id: Id9613a1b7828a6059a163c1eb73919764987af12
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-26 18:16:36 +01:00
Friedemann Kleint 1c75be5290 documentviewer demo: Fix zoom actions
Use modern theme icons. Add standard shortcuts to the PDF
viewer actions. Remove duplicated adding to the toolbar.

Pick-to: 6.8
Change-Id: I4cfe33c7b8fcc3c070f5c0542b821dd9393bfe2d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-11-26 09:17:53 +01:00
Jøger Hansegård 9d7ff8c111 Switch media player audio output when OS default audio output changes
This patch allows the user to change the audio device while a video or
audio file is being played in the media player app.

Before this change, audio would start playing on operating system's
default audio device, but it would not switch to another audio device
even if the user selected another device while the media was playing.

This patch uses a MediaDevices QML element to listen to audio device
changes from the operating system, and will automatically switch to the
device that is set as default at any time.

Fixes: QTBUG-119282
Pick-to: 6.8
Change-Id: Id1acfe9e9025a81c4cc3fa0e4593292f287f7b9a
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
2024-11-13 12:02:34 +01:00
Lucie Gérard c91bd3ae52 Add REUSE.toml files and missing licenses
REUSE.toml files are read by reuse to complement or override the
copyright and licensing information found in file.

The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.

In order to be reuse compliant all the licenses referenced in file
or within a REUSE.toml file must be present in the LICENSES
directory at the base of the module.
The missing licenses are added.

Also, all the licenses present in the LICENSES directory must be used.
License files not used are removed.

[1]: https://reuse.software/spec-3.2/

Task-number: QTBUG-124453
Task-number: QTBUG-125211
Pick-to: 6.8
Change-Id: I1dabbf6f13c2ae5ad73dc8c7df9108c160e1dc2b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-11-06 13:48:01 +01:00
Assam Boudjelthia 64bbf3c432 Android: remove packagingOptions.jniLibs.useLegacyPackaging property
This is not needed after 0db5b424cdaede8724886e8a1eda1380382d9aaf.

Change-Id: Ic4eee7a99458e294f5dc79bba44dc844064f63c2
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-11-01 15:58:52 +03:00
Christian Strømme a9ac82bffd Adapt the XR-physics based demo to work with multiview
Pick-to: 6.8
Change-Id: I2c624fd5f6fb0e74a5645acd273f2d089510b8f2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-10-18 14:05:59 +02:00
Ali Kianian dcf7d543f1 CarRenderingApp: Update example icon
The icon is only used in the documentation of this example.
It should be updated since there are some changes in the view of the
example.

Pick-to: 6.8
Change-Id: Ife23857c0c1aba092255dcd10a5104772a25bd85
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-10-16 15:37:13 +03:00
Even Oscar Andersen 52a4cfad55 Replace deprecated _qs suffix by _s suffix for main.qml
To remove a warning for the examples

Change-Id: Ib59656262e72fcacd75b37f16dfbc40736b919eb
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
2024-10-15 12:22:46 +02:00
Friedemann Kleint fadfccfc4c OSM Demo: Refactor the tile sort algorithm
Introduce a OSMTileData::distanceTo() function and a named lambda for
readability.

Pick-to: 6.8
Change-Id: I7989c6095fc18f9a2bfaa713a1b4b1c0cc162e31
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-10-11 12:54:59 +02:00
Doris Verria 16911df39e ToDoList example: Fix warnings and more improvements
- Bind the  width of the item delegate to that of the attached
ListView.view instead of the width of its parent. The latter
was giving us warnings as the parent was not valid.
- Remove duplicate signal overrides in the CustomStyle's Dialog
implementation.
- Build app as a bundle on macOS.

Task-number: QTBUG-125322
Pick-to: 6.8 6.7
Change-Id: I3817d2f30f9b530fd63e60b8da7f832674883153
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2024-10-04 09:39:18 +02:00
Friedemann Kleint 97df6fbeeb OSM Demo: Small cleanups
- Fix some spelling errors
- Avoid contains()/value() antipattern.
- Move the URL constants into the source do not use tr() on them
- Remove unused lambda parameters

Noticed while porting to Python.

Pick-to: 6.8
Change-Id: I531959984a99dd9113311f43c460c5270e50aa2b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-10-02 17:24:54 +02:00
Friedemann Kleint 49bf5a003e OSM Demo: Make OSMTileData a hashable type using the new comparison macros
Store it in the m_buildingsHash instead of a string key,
saving a few allocations.

Pick-to: 6.8
Change-Id: I6d3e58726ca2d8dc3569915770e96eed9b4f3517
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-10-02 17:24:42 +02:00
Kai Köhne 8d6b46efa3 Disambiguate 'Qt Quick', Qt Widgets', 'Qt Gui' links
qdoc does consider section titles implicit anchors. Adding a
'Qt Quick' section thererfore had the effect that links to 'Qt Quick'
in other pages started pointing to this section, instead of the Qt Quick
module landing page.

Avoid this conflict by making the section title more descriptive.

Pick-to: 6.8
Fixes: QTBUG-129569
Change-Id: I7b1805b2f0cf9ebb65f71a259600b6554db2dc33
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 60e04b1d67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-01 19:07:06 +00:00
Jonas Karlsson 779fea7875 Dice example: tweak shadowBias
There was a bug previously causing the shadowBias to be 2x its specified
value, so update the value to account for this fix.

Change-Id: I980993eb3a798755ede736d6b20537ed4f23186c
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-10-01 14:15:13 +02:00
Jøger Hansegård 4215c9afec Rename media player image file to avoid name clash with QtScXml example
Qt Multimedia's media player, and QtScXml's media player used the same
mediaplayer.png filename on their respective application screenshot,
which caused the QtScXml example image to incorrectly be used with the
Qt Multimedia example.

Renaming the media player image from mediaplayer.png to
mediaplayerapp.png. This way the filename matches the CMake target name
for the application.

Fixes: QTBUG-129444
Pick-to: 6.8 6.7
Change-Id: Ie4d93d2cc5100a42faeec7828775b62a56d3ff23
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-09-28 12:24:01 +02:00
Kai Köhne 6a94fdc9c3 osmbuildings: Declare Qt module dependencies
Make sure that the example is only shown in Qt Creator
is Qt Quick 3D, Qt Positioning modules are available.

Pick-to: 6.8
Fixes: QTBUG-114998
Change-Id: Ia759df01598415f4d534581c4c7bf06290c785b5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-27 14:09:52 +02:00
Assam Boudjelthia 7668e5a746 Android: optimize dice app for mobile orientation
Now, the camera position is set too close so that not the whole view
is shown on portrait mode. So set the camera position close or far based
on the orientation.

Increase the default size of the dice so it's more visible and not tiny.

Don't move/shift the whole scene when the drawer is opened, this just
causes huge drop in fps on Android devices, instead the drawer opens
without affecting the scene's postion or dimentions.

Pick-to: 6.8
Task-number: QTBUG-127813
Change-Id: I3c7c54e4a1dbb3378045d86debaa21c8e50e8e94
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-09-26 15:39:24 +03:00
Assam Boudjelthia e74acbf6df Android: set dice project configuration for publishing to Play Store
Pick-to: 6.8
Task-number: QTBUG-124674
Change-Id: Ie70a492ae94c0dd73a4be1ca24dd4d0923c82f13
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
2024-09-26 15:39:22 +03:00
Assam Boudjelthia 689df23424 Android: set coffeemachine project config for publishing to Play Store
Also, fix few grammar and spelling in the UI.

Pick-to: 6.8
Task-number: QTBUG-124675
Change-Id: Ib04d6ccaeecfa9a8d1a8b02742132f29c42c64d4
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-09-26 15:39:19 +03:00
Assam Boudjelthia b111ec6e1b Android: set calqlatr project config for publishing to Play Store
Pick-to: 6.8
Task-number: QTBUG-120720
Change-Id: Ia08d46d58d876a19434306e0dce4b2c747342e9e
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-09-26 15:39:17 +03:00
Friedemann Kleint f7717beb38 Fix warnings floods of the OSM Demo
Pick-to: 6.8
Change-Id: I3f412b281a866aff74b174e1df8a8858d873cef1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-26 08:40:08 +02:00
Timur Pocheptsov a0885c2cdd MediaPlayerApp: add FFmpeg libraries embedding on iOS
As it was previously done for qtmultimedia's examples.

Pick-to: 6.8 6.8.0
Change-Id: I244e531e722c86632a713999a4762fc1dd17e50b
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-09-26 04:28:11 +02:00
Kai Köhne 013f3e9031 Car-Configurator: Use FetchContent_MakeAvailable
Since CMake 3.30, FetchContent_Populate() with only one argument is deprecated, and will generate a configure time warning:

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(ds) is deprecated, call
  FetchContent_MakeAvailable(ds) instead.  Policy CMP0169 can be set to OLD
  to allow FetchContent_Populate(ds) to be called directly for now, but the
  ability to call it with declared details will be removed completely in a
  future version.

FetchContent_MakeAvailable() is the preferred CMake API, and
also does the add_subdirectory() bit automatically.

Pick-to: 6.8
Task-number: QDS-13600
Change-Id: Ie0a52cfd601a3827dca8efaede4a19fc28db4526
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-09-25 14:04:12 +02:00
Alexey Edelev c50a9c9f02 Fix the order of adding subdirectories in documentviewer demo
Swap 'plugins' and 'app' subdirectories to make plugin targets visible
for the respective conditions.

Fixes: QTBUG-129080
Pick-to: 6.8 6.8.0 6.7
Change-Id: Iadea3e2199527cc530a4a4f9a24c98a8cf59d81d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-24 14:12:57 +00:00
Friedemann Kleint 42c45f28f1 Fix typos, variable names and coding style in OSM Demo
Also fix tabs in the documentation.

Pick-to: 6.8
Change-Id: I026497b4458547a6a85ef07ce9920c9d5b583464
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-23 12:03:35 +02:00
Sami Shalayel 32fc2c18e1 rss news demo: fix qmllint warnings
Fix the qmllint unqualified warnings and custom parsed
property changes.

Also update the documentation to refer to the correct files.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: If8a3c1aab146223d796652f1698744d4b2310323
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-20 13:16:07 +02:00
Sami Shalayel 4da064941b rss news demo: port to qt_add_qml_module
Make the rssnews demo use qt_add_qml_module instead of qt_add_resources.
This populates build/qtdoc/examples/demos/rssnewsdemo/RssNewsModule
instead of build/qtdoc/examples/demos/rssnewsdemo/content because
content is a bad QML module name.

Use qt_standard_project_setup().

Use QQuickView::loadFromModule() in the main.cpp and add a qmldir in the
.qrc to make loadFromModule() work when using qmake.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I060b3817a1c97efb731d7fd8814f421c9ee14168
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-20 13:16:07 +02:00
Sami Shalayel e6274fa50f samegame: fix .qmlproject
Amends 0c02d0545a that broke the
.qmlproject file: remove the unsupported prefer line from the qmldirs
and remove the now empty qmldir to make the .qmlproject file work. It
turns out that the .pro project does not require the prefer line either
from the qmldir files.

Pick-to: 6.8
Change-Id: I5202b589d7320542238a889db66c3975befceab6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-09-20 12:39:41 +02:00
Friedemann Kleint 45be79b81a Brush up the OSM Demo
- Fix clang-tidy warnings
  * Initialize variables
  * Implicit cast to bool
  * Use auto for template casts
  * Use upper case float literals
- Use string literals
- Fix coding style (move braces up)
- Streamline code

Task-number: PYSIDE-2206
Pick-to: 6.8
Change-Id: I5e469cef711ed9f89987d64e5a1b9df2ce49eb15
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-19 12:38:56 +02:00
Even Oscar Andersen c35da8e952 Download assets from master.qt.io not download.qt.io due to CORS
We can add the CORS headers on download.qt.io, but we don't control
the mirrors.

Hence we download from master.qt.io instead.

Fixes: QTBUG-129105
Change-Id: I84c554d9284e2e1a6c5cb52e69b0b8c85c71e145
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-19 12:38:56 +02:00
Alexey Edelev d6e636b7a1 Use the correct Q3Dviewer target name when adding dependencies
Task-number: QTBUG-129080
Pick-to: 6.8 6.7
Change-Id: I15bb5b63612ba81f13813508497d533823672b7d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-09-18 17:02:49 +02:00
Axel Spoerl 94548822fe Documentviewer: Handle absence of QtQuick3D.AssetUtils
The documentviewer demo assumed, that Quick3D always comes with
AssetUtils installed. It attempted to create a RuntimeLoader instance
and asserted the result. This lead to a crash, when case AssetUtils were
not installed.

Don't assert, when no RuntimeLoader object can be instantiated. Return
an empty list of MIME types instead. Ignore plugins that don't support
any MIME types.

Fixes: QTBUG-128673
Pick-to: 6.8 6.8.0 6.7
Change-Id: Ib4771ba93dac2e0aab3a89b7e3cd7e64c97e4e5d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-09-18 13:55:31 +02: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 7247d3ea82 CarRendering: Resolve fog ambiguity for desert in ScreenPrimary
Fixes: QTBUG-128351
Pick-to: 6.8
Change-Id: Icea5c290febdd3b6491f0de203b4ff7022b9589a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-09-10 18:16:51 +03:00
Sami Shalayel a841c45fee samegame demo: fix qmllint warnings
Fix the qmllint unqualified warnings and custom parsed
property changes.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I3a8e310738d1521bae4e233c5610af833fcb697f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-09 15:31:46 +02:00
Sami Shalayel 0c02d0545a samegame demo: port to qt_add_qml_module
Make the samegame demo use qt_add_qml_module instead of qt_add_resources.
This populates build/qtdoc/examples/demos/samegame/SameGameModule
instead of build/qtdoc/examples/demos/samegame/content because content
is a bad QML module name ™️.

Use qt_standard_project_setup().

Use QQuickView::loadFromModule() in the main.cpp and add a qmldir in the
.qrc to make loadFromModule() work when using qmake.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I23e197c99ff284f62fa9deae12afe9ddbd510861
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-09 15:31:41 +02:00
Ali Kianian ae345d2bd9 Port the latest updates from design studio demo project <CarRendering>
The update contains the following changes:
    Unused modules removed:
      * Hood
      * Uk5ofde_LOD0
      * Uk5pebv_LOD0
      * Ulbrbdt_LOD
    MirrorMaterial Removed
    Assets are up-to-date
    New menu style is available
    Blended shadow plane
    New default camera position
    Hood shadow animation fixed
    Working car shadows
    Demo mode camera fixed
    DirectoryFontLoader is used

Task-number: ARTDES-774
Pick-to: 6.8
Change-Id: I35ad6545c3e0dc21b58f6de1a8b09a740c54fffa
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2024-09-09 15:04:54 +03:00
Olivier De Cannière 52d19782d1 Examples: Fix win logic for multiplayer games of samegame
In case player 2 had a higher score at the end of the game, the removed
line would set score to max(score, score2). This would then lead to the
image proclaiming player1 as the winner to be loaded in onModeChanged
by the game canvas in GameArea.qml.

Change-Id: I642d7dc757c4411ccbb836768ca192457057214e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-09-05 10:08:01 +02:00
Kai Köhne 8a98d398d0 car-configurator: Explicitly require 6.8
This silences warnings about QTP0004 . And the example requires the
ExamplesAssetDownloaderPrivate module, which is only available in 6.8,
anyhow.

Pick-to: 6.8
Change-Id: I9ba768abde984dca7c129d97c99ed6d99421aac6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-09-04 09:08:53 +00:00
Axel Spoerl 7f9ff2d5cf Documentviewer demo: Exit application when no plugins were found
When building viewer plugins failed, the application could still be
launched and documents opened. This would crash the application with
a nullptr dereference.

Print a qWarning and exit application in MainWindow c'tor, when no
plugins were found.

Fixes: QTBUG-122041
Pick-to: 6.7 6.8
Change-Id: I92cd1678fdc3f88edc0f35347bd15c3e7c43f122
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-08-30 10:02:58 +00:00
Konsta Alajärvi c2586fe191 Examples: Remove unused imports in coffee example
Remove unused imports in coffee example.

Task-number: QTBUG-123315
Pick-to: 6.8
Change-Id: Ia79a86e35ccb86e1c70fad3f0e5c6e0d1fb88519
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-08-23 09:10:55 +03:00
Konsta Alajärvi 2821519ef2 Examples: Fix coffee example imports
Coffee example gives run time issues on Windows and macOS due to
QtQuick.Controls import that imports styles not customizable on
windows and macOS.

Change imports to QtQuick.Controls.Basic so the same style is imported
on every environment.

Task-number: QTBUG-123315
Pick-to: 6.8
Change-Id: I8f67b87a1fa16d0c8156a05ab065de95aaf363de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-08-23 08:18:17 +03:00
Jonas Karlsson 8b4248d687 Dice example: adapt to Qt 6.8 shadow mapping
The dice shadows are now only enabled when they are close enough to the
table. This will keep shadow map bounds smaller and reduce graphical
artifacts.

Pick-to: 6.8
Change-Id: I4664e4d6d825f0dd01ebb65e1180cb28155cb890
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-08-22 09:11:29 +02:00
Alexandru Croitor 4fc0afc2b4 CMake: Alternative fix of deployment for lightningviewer example
qmlimportscanner is used to scan the qml files, to decide which
plugins and libraries to deploy. Because none of the qml files
explicitly reference the LightningViewer or LightningViewerStyle
imports, it never deploys the qml modules, nor their dependencies.

This change adds a Deployment.qml file to the sources, which is not
actually used at runtime, but because qmlimportscanner sees it, due to
scanning the whole project directory, it will deploy the necessary
files.

Pick-to: 6.7 6.8
Fixes: QTBUG-127835
Task-number: QTBUG-128225
Change-Id: Ic5185d723d3a1f65427af1ee7799fa49ea414cfd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
2024-08-20 13:28:51 +00:00
Ed Cooke 37b941f544 Fix for backspace not considering unary minus in calqlatr demo
In the calqlatr demo, you are able to use backspace to remove the last
digit. This does not consider the last minus sign left when using
backspace on a single digit negative number. In this case, set the
displayed digits to an empty string.

Fixes: QTBUG-127814
Pick-to: 6.7 6.8
Change-Id: Iec82e0650b3b50022be0b5a716976aefa78118a3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-08-19 13:52:51 +02:00
Sadegh Taghavi 9240bdd2f1 Fix the OSMBuilding compiling on the android
Fixed a copy and paste leftover that caused a compiling issue on the android

Fixes: QTBUG-123164
Pick-to: 6.7 6.8
Change-Id: I9d5e7538693c65923cc65bdc792db842c161225a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-08-19 11:50:17 +03:00
Lucie Gérard 7f1fb59710 Change license for examples files
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.8
Task-number: QTBUG-121787
Change-Id: Ie964d4c605a9f7c30be3b601d5de40034c7371f4
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-13 16:13:06 +02:00
Leena Miettinen e3239a8f18 Doc: Fix links to Qt Creator documentation
- Link to topics in Qt Creator 14.0
- Use the macro \QC
- Remove obsolete links
- Remove \externalpage commands to use links from qtbase

Change-Id: I41f6300a5464c8a46ba6c5d0e15a7fbb2164392c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-08-09 13:41:54 +00:00
Sami Shalayel efc394f00c clock demo: use qt_add_qml_module
Make the clocks demo use qt_add_qml_module instead of qt_add_resources.
Also put the qml files in the same folder where the qt_add_qml_module
happens to avoid having two qml modules (one with clocks.qml and another
with Clock.qml), and move the images to an images folder.
Rename the executable to clocksexample to avoid clashes with the newly
added QML module clocks.

Fix the uris to the images to reflect the new path in the qrc.

Use qt_standard_project_setup().

Use QQuickView::loadFromModule() in the main.cpp and add a qmldir in the
.qrc to make loadFromModule() work when using qmake.

Also update the documentation.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I16274f041f6d16acc5910d9eaef645234dc6f34f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2024-07-30 06:52:13 +00:00
Sami Shalayel 73f1137648 maroon in trouble: use qt_add_qml_module + fix bugs
Use qt_standard_project_setup and qt_add_qml_module in the
CMakeLists.txt file.

Fix qmllint warnings:
* unqualifed access by adding the required id
  (note that setting the ids fixed some bugs in the game where the towers
  were placed on the wrong place on the grid, because the root's x and y
  coordinate were used instead of the sprite's  x and y coordinates)
* unqualified access by adding required properties where missing
* reformulated custom parsed PropertyChanges to not be custom parsed
  anymore
* fix the runtime warning when using injected parameters by explicitly
  declaring it via "function (mouse)"
* setting ComponentBehavior Bound wherever needed

Ignore qmllint warnings:
* about unresolved method name 'destroy' that seems to be a bug in
  qmllint
* about unknown properties inside of the logic.js: this is a bug in
  qmllint and can't be fixed in user projects.

In addition: fix the paths be relative to SoundEffect instead of
being relative to where the SoundEffect was instantiated and remove the
SoundEffect proxy to make the sounds work. This has the side-effect that
the games lags because of the poor sound implementation it seems: the
output prints `Failed wait for getting sink drained; was draining: true`
over and over again when a lots of sounds are happening, like lots of
fighting for example. Tracking this via QTBUG-127560.

Add extra self-imports "import Maroon" where needed to get the qmake
version working, as it does not have the fancy nested qml module that
was introduced in 6.8 that fixed this in CMake builds.

Adapt the documentation to the new Main.qml file name, the code snippets
that references the custom parsed PropertyChanges, and removed the
explanation about self-importing the module in Main.qml as that is not
needed anymore. Also remove the part about implementing a SoundEffect
proxy as that is removed and not needed.

Remove the .qmlproject file as it does not know about modules and
therefore can't load the demo's Maroon QML Module.

Move the Main.qml file into a Window to use QQmlApplicationEngine in the
main.cpp file.

Pick-to: 6.8
Task-number: QTBUG-100100
Task-number: QTBUG-127560
Change-Id: I79c7b18a6159208608ef97b271fc24fc9fc06230
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-29 08:56:58 +02:00
Fabian Kosmale 5b2e51a533 colorpaletteclient demo: Opt in to QTP0004
This avoids a warning about using the old policy bheaviour, and allows
us to remove redundand own-module imports.

The qmake project needs no further adjustment, as it already collapses
the folder structure in the qrc file system.

Pick-to: 6.8
Task-number: QTBUG-126201
Change-Id: I1804611c6158775346d2f652537ae48664e5a267
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-07-22 09:25:29 +02:00
Dilek Akcay 7d6639ff32 Update stocqt according to API changes
Pick-to: 6.8
Task-number: QTBUG-127048
Change-Id: I6bdeabd97f6509942eb50327d32bcbe3c6c1a5ee
Reviewed-by: Sakaria Pouke <sakaria.pouke@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-07-16 10:05:08 +03:00
Sami Shalayel 7b528c1723 documentviewer 3d plugin: use qt_add_qml_module
Use qt_add_qml_module for the document viewer demo 3d plugin.

Make the plugin qmllint clean by removing unused imports, unqualified
accesses and setting the ComponentBound behavior.

Use loadFromModule instead of setSource, and rename q3dViewer.qml to
Viewer.qml to be loadable. Same for queryMimeTypes.qml that is now
QueryMimeTypes.qml.

No doc or .pro files needed to be changed as the quick3d viewer plugin
has neither documentation nor qmake file.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I723277d53ed4b7eb1353772928c6069919d0b4e9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-10 08:45:45 +02:00
Sami Shalayel c4d3c1690a dice demo: use qt_add_qml_module
Use qt_add_qml_module for the dice demo.

Make the demo qmllint clean by removing unused imports, unqualified
accesses and more.

Use loadFromModule instead of load, and rename main.qml to Main.qml to
be loadable. Also add a missing qmldir file for the qmake project to
work with loadFromModule, and fix the prefixes in the .pro file.

Pick-to: 6.8
Task-number: QTBUG-100100
Change-Id: I786dcb971980f48e91b0aeaf9d65f285a78c260e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-07-09 08:57:19 +02:00
Ali Kianian 953873d996 Port the latest updates from design studio demo project <CarRendering>
The update contains the following changes:
* better glow for lights
* videoWall reflections fixed
* Updates to the UI, buttons and logo position
* Fixes on Glitches
* FaceLift
* New Wheels and BackLights
* VideoWall rePositioning
* New Car PaintWork + videoWall
* BackLight Reflection removal
* Desert polishes
* Studio Improvements
* Smooth Car paint change transitions
* ColorButton Start fix
* Door openings
* Added Trunk and Hood openers
* Visibilty of door openers based on camera Angle
* Door openers Smooth transitions
* Removed Lights from Studio
* Reflection Probe ReDone in VideoScene
* Door button is smaller and has background blur
* Interior colors and Lights
* Interior material tweaks
* More realistic headlights
* New Car paint material
* Tiny update to margins for UI
* Better carPaint and Window materials
* Headlight glass material
* New Wheel textures
* Front headlight geometry
* Added easing to door animations
* Door button fix
* New Demomode Blending
* Headlight decal and material update
* Desert Visual updates
* Desert scene Custom shadows
* Fix new shadows
* More Transparent fake shadows
* Added a new svg icon for the door and updated the button for it
* Tiny update to pebbles and enabled shadow plane inside car
* Blended Shadow plane
* Added Correct button font
* New Default Camera position
* Hood shadow animation fixed
* Working car shadows

Task-number: QTBUG-126959
Pick-to: 6.8
Change-Id: I596f6befeb881c73354306f51feca4faa7c88c6e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-07-08 14:03:00 +03:00
Jonas Karlsson 00c3e3d3d7 CarRendering: improve shadowmap bounds
Makes the objects far from the car not cast shadows which makes the
shadows look better

Pick-to: 6.8
Change-Id: I55cf6b8c886da6141b1872881e02d8f5164a31eb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-07-03 23:05:28 +02: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
Dilek Akcay 95a83c116c Fix stocqt warnings
Fixes: QTBUG-126517
Fixes: QTBUG-126578
Pick-to: 6.8
Change-Id: Ibd497e9c9c0d82864f2388d6e8e6844ffb2bacbb
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2024-06-28 10:58:17 +03:00
Sadegh Taghavi 3b602e8a35 Add Qt exclusive demo token
Add Qt exclusive demo token provided by OSM using an AWS API endpoint as a proxy.
Add the ability to change the example token by the user in runtime.

Fixes: QTBUG-124144
Pick-to: 6.7 6.8
Change-Id: I590f0c31b795edede7ba6b23c6bbc3ef0a5bb468
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-06-24 08:04:22 +00:00
Mikko Gronoff 1e1f20747d thermostat: update energy consumption unit
kWh instead of KM/H.

Pick-to: 6.7
Change-Id: I97d8f73af902b11315f58ee190144bedb002b913
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-28 09:13:26 +03:00
Friedemann Kleint dbd33f139b Fix mediaplayer to work with Python
Adapt the Python code to qtdoc/
96ee261e6b.

Task-number: QTBUG-122273
Pick-to: 6.7
Change-Id: Ibe92481ffff21ce1de0c6804548d76fcc8587688
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
2024-05-27 08:39:05 +02:00
Assam Boudjelthia 5192e12c42 Android: update build.gralde file
To close the gap between it and the default build.gradle template.

Change-Id: Ic118f73b3bf39824931d502bd97427b8addcfaea
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-24 13:15:23 +03:00
Assam Boudjelthia 45a82b2b73 Android: cleanup AndroidManifest.xml files in examples
Change-Id: If4712fb258052a1a74d56ecb8415503d4025b8b3
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-05-23 15:13:28 +03:00
MohammadHossein Qanbari 84e962eae5 LightningViewer Example: add 'import QtQuick.Control.impl'
There was a missing import. The 'QtQuick.Controls.impl' is required to
be imported when instantiating IconLabel.
Missing this import makes the example fail to run as the IconLabel type
is not known.

Change-Id: I1bc2baa150678d7398fdff5f9a5d867c73113277
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
2024-05-14 08:57:46 +00:00
Alexandru Croitor cde9cfb96c CMake: Add deployment API to our examples
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor

Some examples had to be adapted manually, mostly those that build
additional qml modules / plugins.

documentviewer did not get the deployment api, because it's trickier.

Pick-to: 6.7
Task-number: QTBUG-101340
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: I76322185fc824c112d77e077ee39e7ccbc193a4c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-05-13 09:44:04 +02:00
Konsta Alajärvi b8232a7adb Remove not needed leftover file from Coffee Machine example
Removed Cup.qml from Coffee Machine example. The file was not supposed
to be there after the example re-design as it is supposed to be
replaced by the Cup.ui.qml but apparently it was not fully removed and
was left in the file listing of coffeemachine.qrc.

With Cmake the file has not been visible in Qt Creator or Squish
but with qmake its visible in Qt Creator
and exposed to Squish as well.

Affects testing the example because the same object has different
object names in Squish between Cmake and qmake.

Task-number: QTBUG-123440
Pick-to: 6.7 6.7.1
Change-Id: I82c2a315cd8af9459e5d5caecb3a3efe8a1e5eff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io>
2024-05-13 06:39:30 +00:00
Konsta Alajärvi 20e9c489b8 Fix coffee machine example recursive rearranges
Coffee Machine example gives warnings about UI component recursive
rearrengements on Settings, Insert and Ready pages when orientation
changes.

Tracked issue to originate from the coffee cup image Rectangle
container trying to resize its width based on its height.

Removed the width to height bindings.

Task-number: QTBUG-123445
Pick-to: 6.7 6.7.1
Change-Id: Idd4ee13bc2446608a2f8d5d472370c120b4d05b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-05-13 09:39:22 +03:00
Axel Spoerl 59c784dff2 Documentviewer demo: Reset AbstractView::m_printingEnabled in cleanup
m_printingEnabled wasn't reset in AbstractViewer::cleanup().
That prevented the printingEnabledChanged() signal from being fired,
when a viewer displayed a printable document from the 2nd time onward.

Always disable printing in the cleanup() method.

Fixes: QTBUG-125057
Pick-to: 6.7
Change-Id: I7d237a27a3547103ef0ce099a0735b2444bc0248
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-08 09:45:55 +02:00
Konsta Alajärvi 36e2025667 Fix Coffee Machine example coffee cup image
Coffee Machine coffee cup image is broken with Qt 6.7.0 for unknown
reasons, more descriptive explanation in the linked bug ticket.

Modified the broken dark_cup.svgz image to expose the hidden
parts of the image.

Before Qt 6.7, Qt only supported SVG Tiny 1.2 standard. From Qt 6.7, we added some of the most used features in SVG 1.1. The file in this example uses <filter> element which was not support before, and since it was not supported it was never parsed. In Qt 6.7, this <filter> element is parsed. However, we only support a subset of the filter primitives that can be used inside the <filter> element, and since this file uses an unsupported filter primitive <feBlend>, it causes an issue.

Simply removing the reference to the <filter> element from the Svg file, fixes the issue.

Fixes: QTBUG-124707
Pick-to: 6.7 6.7.1
Change-Id: I62391fa4fc320f440045958e0ef0dc2eef69d21c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-29 11:52:59 +00:00
Fabian Kosmale 2a5bd980ce calqlatr: Use qt_standard_project_setup
Pick-to: 6.7
Change-Id: I673572b691554c90057296871f87c9cab2c1237c
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-04-19 11:51:04 +00:00
Even Oscar Andersen cb69d167bb Add missing sound files to dice qmake build
Pick-to: 6.7 6.6
Change-Id: I56de4c78fdf979cd43be067e402a8ff90df2ba8b
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-04-17 08:18:55 +00:00
Bartlomiej Moskal 252e19f0c7 MediaPlayer demo: Add FileNameProvider for PlayList
There is an issue on Android where QFileDialog does not return real
filenames. Instead, it returns content URIs that do not seem appropriete
for displaying in playlist.

To ensure that filenames are displayed correctly, we need to use
QFileInfo. Since there is no QML type for QFileInfo, additional
FileNameProvider singleton type has been registered for QML use.

Fixes: QTBUG-122273
Pick-to: 6.7 6.5
Change-Id: Ib6bd152856a6979788bcbb203d58a38810ea0682
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-04-16 18:19:34 +00:00
Ed Cooke 6c73363cd3 Add qmldir file to calqlatr example
In order for the calqlatr example to successfully load Main.qml when
building with qmake, a qmldir file needs to be added.

In addition, the files listed in OTHER_FILES, were redundant, since
those files were already listed as qrc resources.

Fixes: QTBUG-123714
Pick-to: 6.6 6.7
Change-Id: Id773ecf93c9b113385121da62de99ced3f8debdf
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2024-04-15 20:17:11 +02:00
Samuli Piippo f89dfde4ed calqlatr: remove special characters
The demo's buttons were using Mathematical Alphanumeric Symbols, which
are not available in all fonts. Replace them with regular characters.

Fixes: QTBUG-122605
Pick-to: 6.7
Change-Id: I24e61eb11f8df34149d0d0fd962054ea759729c1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2024-04-13 11:12:39 +02:00
Konsta Alajärvi 1ed82c8dc9 Fix Coffee Machine example initial size on big displays
Fix the issue with the Coffee Machine example application window
filling the whole  virtual desktop screen space, which is wrong.

Set initial application window size to some hardcoded values which
will be used on desktop. On mobile platforms the window size will
be maximized.

Update docs to reflect this change.

Fixes: QTBUG-123414
Pick-to: 6.7
Change-Id: If8323c0c1ada4aa5230aa94cf624b2a0ff859b5e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-11 08:40:35 +00:00
Chris Lerner 09eeab6ef4 Set up InAppPurchaseBackend for platforms other than Android and IOS
The hangman example relies on a backend for in-app purchases.
This backend was not properly set up for platforms other than IOS and
Android. This lead to an invalid memory access when utilizing the
backend which resulted in a crash.

Inside the function that does the backend setup, instead of immediately
returning on other platforms, assign an InAppPurchaseBackend object to
the backend variable. This will allow the application to keep running,
and warn the user that InAppPurchaseBackend is not implemented on
the platform.

Fixes: QTBUG-124146
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I77f64849bf16132f8380fd5b25db89098f86e2e5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-05 14:55:21 +00:00
Chris Lerner 44c9b5162f Correct a typo in Thermostat example
Pick-to: 6.7 6.6 6.5
Change-Id: Ifcfb7005fb95ad7851e701fd7cbb287f4341f086
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-04 10:06:30 +00:00
Lucie Gérard 6dee263d19 Change license for examples files
According to QUIP-18 [1], all example files 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: I527c8178b83116fde9b83242bc2977acf0f2a8fc
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-04 09:00:53 +00:00
Even Oscar Andersen 5c04abcb6e Dice demo: Add missing menu icon to qmake project
Pick-to: 6.7 6.6
Change-Id: I6e463cf04d0e4ca6d7015e17241d657940a01613
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-04-03 05:17:17 +00:00
Sakaria Pouke 9e9fcf7477 StocQt clarify user api usage
Clarify the needed api and where to put it

Pick-to: 6.7 6.6
Change-Id: I7678abd02be2f9154ecfc5d3c2a003c35de2013b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-25 06:13:00 +00:00
Mikko Hallamaa c5e047f5c7 MediaPlayer: Remove restrictions of protocols in URL
The URL input field had a validation that limited the possible protocols
to only http, https, rtp, rtsp and udp.

This patch modifies the validation regular expression to allow for more
protocols supported by FFmpeg.

Pick-to: 6.7
Change-Id: I84861673a78d4317592f96b4a92d8e676b05660f
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
2024-03-21 10:05:56 +01:00
Kai Köhne 07dfdfac03 Examples: Remove shared resources from examples
Fixes: QTBUG-123472
Change-Id: Id45b966cfc3405718a99441e3e0c4f0d17e601c9
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-03-20 13:29:48 +01:00
Lucie Gérard 0b0ba1bc42 Correct license for documentation files
According to QUIP-18 [1], all documentation files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7 6.7.0
Task-number: QTBUG-121787
Change-Id: Idbbd9c9bc1780cf97c71398a3b118d5b371b0ca3
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-19 09:56:22 +01: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
Lars Sutterud 4c3ea1b6eb Lightning Viewer: Update docs to clearly state use of simulated data
Due to the lack of an agreement with the lightning strike data provider,
we will only provide simulated lightning strike data for this demo. This
change removes info in the documentation about the option to forward
real world lightning data, and makes it more clear that the data is
simulated.

Fixes: QTBUG-122907
Pick-to: 6.7
Change-Id: Ibae18922e79393564b3947d813b1285f0358aaf9
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-03-18 08:14:57 +01:00