Hello,
I would like to replace QtScript with QML because C++ object binding seems far simpler.
However I have a problem, how can I create new objects inside a 'script:{...}'?
To illustrate the problem, here is a copy/paste of the examples/declarative/text/fonts/hello.qml:
ScriptAction {
script: {
container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
}
}
ScriptAction {
script: {
container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
}
}
To copy to clipboard, switch view to plain text mode
How could we add something like: var myrect=new MyRect(); ?
Regards,
Bernard
Bookmarks