Commit Graph

19 Commits

Author SHA1 Message Date
Fabian Kosmale 9823794211 robootarm: Configure qmllint to skip unavoidable warnings
We don't want to warn about the custom parsing, as we'd oherwise lose
QDS compatability.

Pick-to: 6.10 6.10.0
Fixes: QTBUG-140387
Change-Id: I02cf32a33777decef56f31fda35c4cf74c1aff12
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-09-19 12:03:38 +02:00
Fabian Kosmale f36c67b40d robotarm: clean up main
Use loadFromModule, instead of load, as it's the simpler and newer API.
That requires renaming main.qml to Main.qml, and some changes to the
CMakeLists.txt file. That gets rid of a runtime warning about using
relative URLs.

Moreover, avoid adding an import path we don't need, and remove the
error handling for the case where loading fails – we know it can't fail.

Pick-to: 6.10
Fixes: QTBUG-138177
Change-Id: I01a3eac70147bf5aef6456be0b634af933daae20
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-21 10:22:51 +02:00
Fabian Kosmale 0da5048dd7 robotarm: Port QML visible property to QObjectBindableProperty
This allows us to give it a signal, which silences a qmllint warning.
While the engine does not actually need that currently, it is planned
that we want to slowly get away from supporting non-notifying bindable
properties.

This allows us to set max-warnigs to 0 for qmllint.

Pick-to: 6.10
Fixes: QTBUG-138176
Change-Id: I3221095f31639d90ebcc9d54fd4376cfb9140961
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-21 10:22:47 +02:00
Fabian Kosmale 0b7bdaf1e9 robotarm: fix warnings in RoboticArm.ui.qml
Task-number: QTBUG-138176
Pick-to: 6.10
Change-Id: Ieae69c165f74ff5ea74625c166291e0aedc3709a
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-21 10:22:43 +02:00
Fabian Kosmale 7304b6b8cb RobotArm: fix code in NodeIndicator
NodeIndicator was trying to access properties from the Material attached
object. However, that one was shadowed by the Material type from
Quick3D. Avoid this by importing Controls into a namespace for
disambiguation purposes.

Also avoid a warning about mismatched types by explicitly casting
"parent" to a View3D before assigning it to a property of that type.

Pick-to: 6.10
Task-number: QTBUG-138176
Task-number: QTBUG-138177
Change-Id: I336455a3fdc9da610fc0e703328aec26bf3741f9
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2025-07-21 10:22:40 +02:00
Fabian Kosmale 346b5838c9 robotarm: Fix most qmllint warnings in MainScreen
Pick-to: 6.10
Task-number: QTBUG-138176
Change-Id: I9a2b3f76c86bea854d6355a34d8c6ce88305aec5
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-21 10:22:37 +02:00
Fabian Kosmale 727f569ec1 robotarm: Help qmllint by specifying dependencies
We can avoid confusion in qmllint by explicitly specifying that the
content module depends on RobotArm (using the target based dependency
API).
At runtime this happens to work because the application rearranges the
modules in the import path, but that's a runtime setting.

Pick-to: 6.10
Task-number: QTBUG-138176
Change-Id: I91e1a4142a691d70784380ef0de42fc198eaa3f7
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-21 10:22:33 +02:00
Fabian Kosmale 6982bbc526 robotarm: Avoid Qt.application
Use the Application singleton from QtQuick instead, which always has the
QtGui dependent properties available.

Pick-to: 6.10
Task-number: QTBUG-138176
Change-Id: Ica56a406a67bda9dce0053416b4b867481c5f233
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
2025-07-21 10:22:29 +02: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
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
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
Samuli Piippo 22315147d0 CMake: fix installation of demos projects
Projects need install instructions to be usable on embedded platforms.
Fix existing instructions to put files into correct places.

Fixes: QTBUG-112024
Pick-to: 6.7
Change-Id: I6a3d84edc1c67281d5497e99144c159faf0f783c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
2024-01-25 15:13:29 +02:00
Kai Köhne 9a61a3a987 Demos: Add dependency info to example metadata
Add metadata about build time / runtime dependencies in the form
of Qt documentation modules. This should allow Qt Creator to hide
examples where needed Qt modules are not installed (because they
are optional in the Qt Online Installer).

Pick-to: 6.7
Task-number: QTBUG-120759
Change-Id: I03d8d75b273fe497803b9af9783b90e397b0638d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-19 10:26:22 +01:00
Kai Köhne 625b277c58 Doc: drop 'example' from title of application examples
There is no need to keep the example in the title, see also
https://wiki.qt.io/Qt6/Example-Guideline .

Pick-to: 6.7
Change-Id: If173285c2e0f0ef7d21a113e4e0713aef84511dc
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-01-10 16:02:48 +01:00
Kai Köhne d4a134f2e5 Examples: Check for availability of Quick3D at configure time
The examples do not need to link against Quick3D, but they use Quick3D
QML import. Qt Quick3D is an optional component in the online installer
though, so its easy to miss. By adding Quick3D to find_package(),
we exchange a runtime error with a configure error in this case:

  error: Found package configuration file: C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND.
  Reason given by package: Failed to find required Qt component "Quick3D". Expected Config file at "C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6Quick3D/Qt6Quick3DConfig.cmake" does NOT exist

Pick-to: 6.5 6.6
Task-number: QTBUG-114998
Change-Id: I092068c5055d329769986da8d39605cb1bae3a4f
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-09-09 16:52:39 +02:00
Kai Köhne 0f05ed1e01 Examples: Explicitly mention Quick3D requirement in the documentation
Quick3D is an optional component in the online installer. As the examples are part of qtdoc,
they are however installed & available also if Quick3D is missing.

Let's at least mention the dependency in the respective examples' documentation.
Add a general 'Running the Example' section if missing, too.

Pick-to: 6.5 6.6
Fixes: QTBUG-114998
Change-Id: If4d3b48b3d0352a0359f6962d4eb1bc2e1e67c95
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2023-08-11 13:58:36 +02:00
Kai Köhne e1220042e6 Doc: Add more examples to Application Examples category
Add following examples to Application Examples category:

* Robot Arm Example
* Qt Quick Demo - RESTful Color Palette API client
* Media Player Example
* Document Viewer

Pick-to: 6.5 6.6
Change-Id: Ie36bb9a09d7fe868db07e02edcb1778f214494e9
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-06-15 11:07:40 +02:00
Amir Masoud Abdol 8b6976b931 Resolve a duplicate target name issue
Both robotarm, and todolist examples were creating `content` target
which was breaking the build if both examples were activated.

Pick-to: 6.6
Change-Id: I0922765526f2fca861c16b1ced4f1c040c104adc
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2023-06-13 13:03:40 +02: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