Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.1
-
None
Description
I have some QObject-derived class Foo.
I register it using: qmlRegisterType<Foo>();
I have 2 classes exported to QML: one has this method:
Q_INVOKABLE Foo* createFoo();
Second one has this method:
Q_INVOKABLE void useFoo(const Foo*)
The code in QML:
var foo = firstClass.createFoo();
secondClass.useFoo(foo);
The last line of code generates exception that the parameter is unknown.
WORKAROUND: I had to remove const specifier from the useFoo parameter.
Attachments
Issue Links
- relates to
-
QTBUG-82354 Allow using const pointers as parameters of C++ functions called by QML
- Closed
- resulted in
-
QTBUG-61749 Unable to handle unregistered datatype 'const QQuickPointerDevice*' for property 'QQuickPointerEvent::device'
- Closed