summaryrefslogtreecommitdiffstats
path: root/examples/datavisualization/qmlscatter/doc
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2023-01-27 13:31:13 +0200
committerTomi Korpipaa <tomi.korpipaa@qt.io>2023-01-31 09:08:16 +0200
commitfceaae35f9af7dc998bf2dd203cdfca7126dce38 (patch)
treeff443a1b97be34dd14f0661a1c662cddb5c404a0 /examples/datavisualization/qmlscatter/doc
parentfcb72898b2c8f05ee1a5d2e2e192cc3b9afba486 (diff)
Revamp qmlscatter example visuals and documentation
Pick-to: 6.5 Fixes: QTBUG-110702 Change-Id: I518e986832d68f39eb63154fea7869a0136c10f0 Reviewed-by: Dilek Akcay <dilek.akcay@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples/datavisualization/qmlscatter/doc')
-rw-r--r--examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.pngbin98086 -> 107603 bytes
-rw-r--r--examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc24
2 files changed, 18 insertions, 6 deletions
diff --git a/examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png b/examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png
index 65ec4816..5d5de700 100644
--- a/examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png
+++ b/examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png
Binary files differ
diff --git a/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc
index 2055102e..aa2029d2 100644
--- a/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc
+++ b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc
@@ -32,7 +32,7 @@
To make deployment little simpler, we gather all of the application's \c .qml files to a resource
file (\c qmlscatter.qrc):
- \code
+ \badcode
<RCC>
<qresource prefix="/">
<file>qml/qmlscatter/Data.qml</file>
@@ -45,6 +45,20 @@
\snippet qmlscatter/main.cpp 3
+ When using cmake instead of qmake, the \c .qml files are added into a QML module in the
+ \c {CMakeLists.txt} instead:
+
+ \badcode
+ qt6_add_qml_module(qmlscatter
+ URI Scatter
+ VERSION 1.0
+ NO_RESOURCE_TARGET_PATH
+ QML_FILES
+ qml/qmlscatter/Data.qml
+ qml/qmlscatter/main.qml
+ )
+ \endcode
+
Lastly, we want the application to run in a maximized window:
\snippet qmlscatter/main.cpp 2
@@ -55,9 +69,6 @@
\snippet qmlscatter/qml/qmlscatter/main.qml 0
- The last \c import just imports all the qml files in the same directory as our \c {main.qml},
- because that's where \c Data.qml is.
-
Then we create our main \c Item and call it \c mainView:
\snippet qmlscatter/qml/qmlscatter/main.qml 1
@@ -79,10 +90,11 @@
\snippet qmlscatter/qml/qmlscatter/main.qml 3
- We added a customized theme and changed the shadow quality.
+ We added a customized theme, changed the shadow quality, and adjusted the camera position.
We're happy with the other visual properties, so we won't change them.
- The custom theme is based on a predefined theme, but we change the font in it:
+ The custom theme is based on a predefined theme \c {Theme3D.ThemeQt}, but we change the font
+ in it:
\snippet qmlscatter/qml/qmlscatter/main.qml 13