Hi,
What part of the docs do you mean here?
https://doc.qt.io/qt-6/qqmlengine.html#QML_ANONYMOUS
"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" i
Servus Ulf,
What part of the docs do you mean here?
https://doc.qt.io/qt-6/qqmlengine.html#QML_ANONYMOUS
"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
But how to tell the engine to make use of it when executing a property
assignment ?
You mark the type with Q_GADGET and QML_ANONYMOUS. Then moc and
qmltyperegistrar should pick it up automatically ... Provided you
actually use qmltyperegistrar, of course. If not, I recommend converting
to sta
Hi Uwe,
instead of using QQmlMetaType::registerCustomStringConverter() you
> can add a static create() function that takes a QJSValue as
argument to your class or have a ctor that takes QJSValue. Then
register the
type using QML_ANONYMOUS and it should be possible to create it from
any JavaScri
Hi Ulf,
thanks for the hints.
instead of using QQmlMetaType::registerCustomStringConverter() you > can add a static create() function that takes a QJSValue as argument
> to your class or have a ctor that takes QJSValue. Then register the >
type using QML_ANONYMOUS and it should be possible to
There hasn’t been too much feedback on the proposal or the implementation so
far. I’ll give it until the weekend, and unless further comments or issues come
up, I’ll assume a lazy consensus on the proposal and start looking into taking
the system into use next week.
There are two additional ite