perform a binding instead of value with the
changed part.
-Original Message-
From: Richard Weickelt
Sent: April 16, 2019 7:39 AM
To: Jérôme Godbout ; interest@qt-project.org
Subject: Re: [Interest] Creating C++ objects in JavaScript with operator new
> You can also generate an ob
> You can also generate an object from Qml code directly:
> Qt.createQmlObject()
I know, but I wanted to use operator new in order to achieve a better look &
feel. Please note that this is/was easily possible in Qt Script. See the
code snippets at
https://doc.qt.io/qt-5/qtscript-index.html#making
You can expose the C++ object to metatype, then register the MetaObject using
qmlRegisterType<>() to the Qml types. You then should create a Component and
instanciate the component into an actual object:
I strongly suggest you read this:
https://doc.qt.io/qt-5/qtqml-javascript-dynamicobjectcreat