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:
Qt Code:
  1. ScriptAction {
  2. script: {
  3. container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
  4. container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
  5. }
  6. }
To copy to clipboard, switch view to plain text mode 

How could we add something like: var myrect=new MyRect(); ?

Regards,

Bernard