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 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 pyside6-qmltyperegistrar to function.

For example, for a .qml file like:

import QtQuick
import QtQuick.Controls

Item {
    Text {
        id: name
        text: qsTr("Hello World")
    }
}

when running:

pyside6-qmllint Main.qml

it would warn about unused imports:

Info: Main.qml:2:1: Unused import [unused-imports]
import QtQuick.Controls
^^^^^^