Hello all,
I am working on a project which I use QML to draw my GUI. But somehow I need to generate QML files from XML based solution like this;
Code:
<general> <text name="src_text1" value="this is text 1" /> <text name="src_text2" value="this is text 2" /> <image name="src_image1" location="/opt/cutekit/data/images/qt.png"> <!-- many more slots to come! --> </general>
to;
Code:
Rectangle { width: 1920 height: 1080 color: "#00000000" Text { id: text1 x: 252 y: 574 width: 80 height: 20 text: src_text1 font.pixelSize: 12 opacity: 0 } Text { id: text2 x: 492 y: 574 width: 80 height: 20 text: src_text2 font.pixelSize: 12 opacity: 0 } Image { id: image1 x: 772 y: 297 width: 100 height: 100 source: src_image1 opacity: 0 } }
So my question is, do I have to do this manually on runtime(parsing xml, creating qml file), or is there any tool to help me on this one?