Qt Contributors Summit 2022 - Program/What's new in QML (non-visual) tooling

From Qt Wiki
Jump to: navigation, search

Session Summary

Learn about upcoming features in qmllint and the QML language server, and make feature requests/suggestions

Session Owners

  • QML team


(Taken by Samuel Gaist)


What is it ?

- Linting tool

- configurable through settings files and command line

- Supports JSON output for better CI integration

What's new ?

- integration into qmlls (language server)

- Fix suggestions (auto applicable)

- New linting rules for QtQuick and Controls

- Integration in the compiler with automatic fixes applicable

- plugin system WIP


- add settings support in qmlls and Qt Creator

- stable plugin API

- Improved automatic fixing

qmllint plugins

- Unstable

- Allows to add new passes to extend it

- Uses Qt plugin system

- Uses qmlcompiler library internals

- Two type of passes

  - Property passes: property binding, read, write checks

  - Element passes: run on every element

The examples are being linted and there's a huge amount of work to do there.


What is it ?

- Language server protocol implementation for QML

- auto complete, lint & warnings, highlighting indenting

- Qt Creator already integrates it through a client plugin

- It's independent of the editor itself (so not tied to Qt Creator)

Plumbing highlights

- Typed JSON serialization

- Autogenerated protocol


  - Symbols find usages

  - Indexing (try to use language server index format)

  - Better integration with compiler library

  - Creator integration

  - VS Code extension

Target is to get that for Qt 6.4


When will this replace QmlJSEditor ?

It's almost ready, the missing symbols find usages is the main roadblock.

Add a button to Qt Creator to switch to the language server in place of the currently used system.

Qt plugins in VSCode are currently not really good for QML development as they are using on hard coded knowledge.


- put our tooling in other IDEs like vscode or Visual Studio

- add support for CI

Some work to do

- Move everything to QML module

- Cleanup QML code provided to match current standard