- Have an option to disable the warning for those who want to support multiple styles in
one executable (but still want compilation outside of controls). You said it is possible
to "disable the compilation for this specific file", but I'm not sure if that's
the same thing as disabling the warning for the whole codebase, which would be preferable.
As described in https://doc.qt.io/qt-6/qt-add-qml-module.html you can
turn the compilation to C++ off per target with the --only-bytecode
option to qmlsc or qmlcachegen. qmltc and qmllint are opt-in anyway.
- Add instructions to the warning that mention how to fix it if they're OK with
only supporting one style, or disable it.
The message is a generic warning you will get for any optional imports,
not only for QtQuick.Controls. If you don't like to see this warning,
you can turn it off in most cases:
* qmllint currently has no way to output this warning.
* qmlcachegen is silent by default and suppresses all warnings.
* qmlsc outputs warnings, and also this one, by default, but you can
just turn off the qt.qml.compiler.aot logging category if you want it to
be silent.
* qmltc will fail on any missing type information, including this one.
That's unavoidable. It cannot create a sensible C++ object structure if
some part of it is invisible.
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest