add a scrollview

This commit is contained in:
lordwelch 2016-03-07 21:40:07 -08:00
parent 2cb1ac06e7
commit efcb9746e8
2 changed files with 41 additions and 37 deletions

View File

@ -75,46 +75,50 @@ ApplicationWindow {
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: 0 anchors.topMargin: 0
SplitView { ScrollView {
id: gridData id: scview
objectName: "gridData"
anchors.rightMargin: 4
anchors.leftMargin: 4
anchors.bottomMargin: 4
anchors.topMargin: 4
anchors.fill: parent anchors.fill: parent
anchors.margins: 4
Rectangle { SplitView {
id: col1 id: gridData
objectName: "col1" objectName: "gridData"
width: gridData.width / 2 width: scview.width
color: "#e41616" height: 100
transformOrigin: Item.TopLeft
border.width: 0
ColumnLayout { Rectangle {
id: data1 id: col1
objectName: "data1" objectName: "col1"
spacing: 1 width: gridData.width / 2
anchors.right: parent.right color: "#e41616"
anchors.bottom: parent.bottom transformOrigin: Item.TopLeft
anchors.top: parent.top border.width: 0
anchors.left: parent.left
Column {
id: data1
objectName: "data1"
spacing: 1
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.left: parent.left
}
} }
}
Rectangle { Rectangle {
id: col2 id: col2
objectName: "col2" objectName: "col2"
color: "#4f90e2" color: "#4f90e2"
border.width: 0 border.width: 0
ColumnLayout {
id: data2
spacing: 1
objectName: "data2"
anchors.fill: parent
Column {
id: data2
spacing: 1
objectName: "data2"
anchors.fill: parent
}
} }
} }
} }

View File

@ -6,11 +6,11 @@ Image {
source: "image://images/" source: "image://images/"
objectName: "cellImg" objectName: "cellImg"
property int index: 0 property int index: 0
height: 150 height: 100
transformOrigin: Item.TopLeft transformOrigin: Item.TopLeft
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
Layout.minimumHeight: 100
Layout.maximumHeight: 200
} }