[Interest] Qt 6.5.2 and qmllint questions/issues

Nils Jeisecke nils.jeisecke at saltation.com
Wed Aug 30 12:25:23 CEST 2023


Hi Matthew,

On Wed, Aug 30, 2023 at 7:50 AM Matthew Fincham via Interest
<interest at qt-project.org> wrote:
> We are in the process of integrating qmllint after migrating a project to Qt6, and have hit a few issues.
> ...
> Please also note the type registration is done manually, not with the code generated by qmltyperegistrar. Any pointers would be appreciated.

Great to see others struggling with similar problems ;-)

In my experience you really should avoid manual type registration and
start converting to "proper qml modules". This is quite some work but
the only way to ensure that tooling really sees the whole picture.

For the qml Code this is actually not so difficult. You might have a
look at https://github.com/njeisecke/qml-migration, this did save me
quite some time.

For the C++ code exposed to Qml there is probably more work to do,
because restructuring parts of the code base is likely required. Rule
of thumb is "one module: one directory, one CMakeLists.txt + uri must
follow source directory structure from project base". Im my experience
any derivation from that rule causes pain and suffering ;-) Or maybe I
still don't fully understand the IMPORTS, OPTIONAL_IMPORTS.
DEFAULT_IMPORTS, DEPENDENCIES. IMPORT_PATH. OUTPUT_TARGETS and
OUTPUT_DIRECTORY options of qt_add_qml_module.

Nils


More information about the Interest mailing list