Error: Cannot assign QJSValue to QObject*
I have a NumberAnimation where the target is a dynamic qml Item object, created with Qt.createComponent().
The code works fine but I always get a error in QtCreator Aplication Output window, I don't know how to remove that annoying error.
Code:
property var badJoeObj: ({})
NumberAnimation {
id: moveBadJoeToAnotherScreen
duration: 1000
}
function moveBadJoe2AnotherScreen(){
moveBadJoeToAnotherScreen.target = badJoeObj // <- Error: Cannot assign QJSValue to QObject*
...
}
Re: Error: Cannot assign QJSValue to QObject*
How about:
Code:
property Item badJoeObj: null
NumberAnimation {
target: badJoeObj
// ...
}
Re: Error: Cannot assign QJSValue to QObject*
Thanks Wysota, that works.