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.topMargin: 0
SplitView {
id: gridData
objectName: "gridData"
anchors.rightMargin: 4
anchors.leftMargin: 4
anchors.bottomMargin: 4
anchors.topMargin: 4
ScrollView {
id: scview
anchors.fill: parent
anchors.margins: 4
Rectangle {
id: col1
objectName: "col1"
width: gridData.width / 2
color: "#e41616"
transformOrigin: Item.TopLeft
border.width: 0
SplitView {
id: gridData
objectName: "gridData"
width: scview.width
height: 100
ColumnLayout {
id: data1
objectName: "data1"
spacing: 1
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.left: parent.left
Rectangle {
id: col1
objectName: "col1"
width: gridData.width / 2
color: "#e41616"
transformOrigin: Item.TopLeft
border.width: 0
Column {
id: data1
objectName: "data1"
spacing: 1
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.left: parent.left
}
}
}
Rectangle {
id: col2
objectName: "col2"
color: "#4f90e2"
border.width: 0
ColumnLayout {
id: data2
spacing: 1
objectName: "data2"
anchors.fill: parent
Rectangle {
id: col2
objectName: "col2"
color: "#4f90e2"
border.width: 0
Column {
id: data2
spacing: 1
objectName: "data2"
anchors.fill: parent
}
}
}
}

View File

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