[Development] Qt 6.2 QQmlMetaType incompatibility
Uwe.Rathmann at tigertal.de
Thu Oct 7 08:28:03 CEST 2021
> What part of the docs do you mean here?
"Declares the enclosing type to be available, but anonymous in QML.
The type cannot be created or used as property type, but when passed
from C++, it is recognized."
Thought that "property type" is supposed to be the type of a property
being exposed to QML ?
I can file a bug report if you agree, that the docs are wrong - or at least
> You can very well have anonymous value types as C++-declared > properties of other types. It may be that we're still missing some >
bits and pieces for the creation from JS values to work. So far the >
approach is only used by the QtQuick value types. Some of those are >
indeed anonymous, but all of them happen to use the foreign/extended >
hack. It should also work without that hack, though. Feel free to > open
a bug report or submit a patch.
As QML_ANONYMOUS is only a macro for "Q_CLASSINFO("QML.Element",
I was trying to identify, where "QML.Element" gets processed and didn't
beside code of the qmltyperegistrar tool.
I also read your additional reply as qmltyperegistrar being mandatory
for my use case.
As my QSkinny project is currently used in pure C++ projects only I have
that I did not pay enough attention to the QML aspects and static type
( https://www.qt.io/blog/qml-type-registration-in-qt-5.15 ) should of
course be the way to go.
Will do my homework.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development