@@ -30,15 +30,21 @@ Rectangle {
3030 property string longText2: "This is a very very very long text. 1 This is a very very very long text. 2 This is a very very very long text. 3 This is a very very very long text. 4 This is a very very very long text. 5 This is a very very very long text. 6 This is a very very very long text. 7 This is a very very very long text. 8 This is a very very very long text. 9 This is a very very very long text. 10 This is a very very very long text. 11 This is a very very very long text."
3131 property string shortText: "This is a short text :)"
3232
33+ ListModel {
34+ id: widgetsModel
35+ }
36+
3337 property var widgetData: {
3438 "title": "Title here",
3539 "collapsed-widgets": 2,
36− "widgets": [
37− { "type": "text", "widgetId" : "text1", "properties" : { "text": longText } },
38− { "type": "text", "widgetId" : "text2", "properties" : { "text": longText2 } },
39− { "type": "text", "widgetId" : "text3", "properties" : { "text": shortText } },
40− { "type": "text", "widgetId" : "text4", "properties" : { "text": longText } }
41− ]
40+ "widgets": widgetsModel
41+ }
42+
43+ Component.onCompleted: {
44+ widgetsModel.append({"type": "text", "widgetId": "text1", "properties": { "text": longText }});
45+ widgetsModel.append({"type": "text", "widgetId": "text2", "properties": { "text": longText2 }});
46+ widgetsModel.append({"type": "text", "widgetId": "text3", "properties": { "text": shortText }});
47+ widgetsModel.append({"type": "text", "widgetId": "text4", "properties": { "text": longText }});
4248 }
4349
4450 PreviewExpandable {