Qt 6.11 is out! See what's new in the release
blog
Unqualified access warning on singleton object with QML_NAMED_ELEMENT
-
I have a singleton QObject declared with
QML_NAMED_ELEMENT(MySingleton)and in QML file I just useMySingletonto access it. When I run qmllint on the file, I get anUnqualified accesswarning. Is this a false positive?How would I:
- Tell qmllint that this is a named singleton so the access is not unqualified, OR
- Qualify the access to the named singleton?
I use CMake and
qt_add_qml_modulewithQT_QML_GENERATE_QMLLS_INIturned on, if it affects how I achieve the first item above.