aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-03-18 14:32:24 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-03-18 20:47:03 +0100
commitc69c8c9bc89518e46efefbdf71a8b63585215bc2 (patch)
tree918ad7504ee92403d960eca68dace66ac15e0146 /sources/pyside6/doc
parentc40358e6a3590e49642888e829f48acd90f0f81f (diff)
doc: add page for pyside6-qmllint
Change-Id: I58b885287ab531f8b88267278688251a3fcf9941 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Diffstat (limited to 'sources/pyside6/doc')
-rw-r--r--sources/pyside6/doc/tools/pyside-qmllint.rst49
1 files changed, 49 insertions, 0 deletions
diff --git a/sources/pyside6/doc/tools/pyside-qmllint.rst b/sources/pyside6/doc/tools/pyside-qmllint.rst
new file mode 100644
index 000000000..54a72470e
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-qmllint.rst
@@ -0,0 +1,49 @@
+.. _pyside6-qmllint:
+
+pyside6-qmllint
+===============
+
+``pyside6-qmllint`` is a command line tool that wraps `qmllint`_. This tool
+verifies the syntatic validity of QML files and warns about some QML
+anti-patterns.
+
+It is automatically run by the :ref:`pyside6-project` tool
+when passing the ``qmllint`` argument instructing it to check
+the QML source files.
+
+Usage
+-----
+
+The tool should normally not be invoked manually since it requires
+a number of import paths and additional type information
+generated by :ref:`pyside6-qmltyperegistrar` to function.
+
+For example, for a ``.qml`` file like:
+
+.. code-block:: javascript
+
+ import QtQuick
+ import QtQuick.Controls
+
+ Item {
+ Text {
+ id: name
+ text: qsTr("Hello World")
+ }
+ }
+
+when running:
+
+.. code-block:: bash
+
+ pyside6-qmllint Main.qml
+
+it would warn about unused imports:
+
+.. code-block::
+
+ Info: Main.qml:2:1: Unused import [unused-imports]
+ import QtQuick.Controls
+ ^^^^^^
+
+.. _`qmllint`: https://doc.qt.io/qt-6/qtquick-tool-qmllint.html