Hello,
i tried so far:
Component.onCompleted: {var newObject = Qt.createQmlObject('
import QtQuick 1.0;
Rectangle {
x:20; y:20;
width: 20; height: 20;
color: "blue";
}',
container, "dynamicSnippet1");}
Component.onCompleted: {var newObject = Qt.createQmlObject('
import QtQuick 1.0;
Rectangle {
x:20; y:20;
width: 20; height: 20;
color: "blue";
}',
container, "dynamicSnippet1");}
To copy to clipboard, switch view to plain text mode
but i am getting Syntax Error : Parse Error.
Where am i wrong?
Thanks
Added after 1 44 minutes:
i found the solution. i must not to split the lines, the string parameter must be one line or must be concat with + operator.
Bookmarks