aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/tools/pyside-qmllint.rst
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/doc/tools/pyside-qmllint.rst')
-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