diff --git a/main.go b/main.go index 3990d74..86ca3af 100644 --- a/main.go +++ b/main.go @@ -303,7 +303,7 @@ func (sl *slide) addCell( /*cl *cell*/ ) { var cl cell cl.index = len(*sl) - + window.ObjectByName("gridRect").Set("count", window.ObjectByName("gridRect").Int("count")+1) cl.qmlcell = cellQml.Create(nil) cl.qmlcell.Set("objectName", fmt.Sprintf("cellRect%d", len(*sl))) cl.qmlcell.Set("parent", window.ObjectByName("data1")) diff --git a/main.qml b/main.qml index 5aab3b4..154ca38 100644 --- a/main.qml +++ b/main.qml @@ -74,6 +74,7 @@ ApplicationWindow { anchors.bottomMargin: 0 anchors.top: parent.top anchors.topMargin: 0 + property int count: 0 ScrollView { id: scview @@ -84,7 +85,7 @@ ApplicationWindow { id: gridData objectName: "gridData" width: scview.width - height: 100 + height: gridRect.count*100 Rectangle { id: col1