I am attempting to dynamically create a list<Transform> object in javascript in order to set a transform property.

This is the minimum compilable example I know how to make at the moment.

Qt Code:
  1. import QtQuick 2.5
  2. import QtQuick.Controls 1.4
  3.  
  4. ApplicationWindow {
  5. visible: true
  6. width: 640
  7. height: 480
  8.  
  9. Component.onCompleted: {
  10. console.log("Trying to create a transform list");
  11. var newObject = Qt.createQmlObject(
  12. 'import QtQuick 2.5; [ Scale { xScale: 1; yScale: 1 } ]',
  13. this,
  14. 'newObject');
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

It gives the error...

Qt Code:
  1. qrc:/main.qml:12: Error: Qt.createQmlObject(): failed to create object:
  2. qrc:/newObject:1:29: Expected token `,'
  3. qrc:/newObject:1:40: Expected token `}'
To copy to clipboard, switch view to plain text mode 

Where am I stuck?

At some point, I'm going to need to append to this list, preferably in QML context and not javascript.
Is the following going to work? Will this nest a list in a list or will it extend the original list?

Qt Code:
  1. transform: [ existingTransformList, Translate { x: 5, y: 5} ]
To copy to clipboard, switch view to plain text mode