Error: Cannot assign QJSValue to QObject*
Solved
QML and Qt Quick
-
I have a NumberAnimation where the target is a dynamic Item object, created with Qt.createComponent().
The code works fine but I always get a error when setting the target, I don't know how to remove that error.property var badJoeObj: ({}) NumberAnimation { id: moveBadJoeToAnotherScreen duration: 1000 } function moveBadJoe2AnotherScreen(){ moveBadJoeToAnotherScreen.target = badJoeObj // <- Error: Cannot assign QJSValue to QObject* ... }