[Development] [QML]: Why can't create Q_GADGETs from QML ?
Simon.Hausmann at qt.io
Tue Jul 26 17:37:04 CEST 2016
No objection per-se, but we'd have to figure out some details. For example declarative instantiation is
constructor function, replacing Qt.point(...) for example. But then we'd have to comply with the namespace
rules, so we'd have
qmlRegisterGadget<MyGadget>("MyModule", "ThatName", 1, 0);
import MyModule 1.0
and in expressions we'd have
var g = new ThatName();
and the same for a namespaced import:
import MyModule 1.0 as Foo
var g = new Foo.ThatName();
It's a bit of work to do, but I don't see a problem in principle.
From: Development <development-bounces+simon.hausmann=qt.io at qt-project.org> on behalf of BogDan Vatra <bogdan at kdab.com>
Sent: Tuesday, July 26, 2016 5:28:35 PM
To: development at qt-project.org
Subject: [Development] [QML]: Why can't create Q_GADGETs from QML ?
Is there any reason why I can only use Q_GADGETs objects in QML, but not to
It will be nice if we can register Q_GADGETs as qml creatable types too.
Development mailing list
Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development