58 lines
1.2 KiB
QML
58 lines
1.2 KiB
QML
import QtQuick 2.4
|
|
|
|
Item {
|
|
width: 400
|
|
height: 400
|
|
|
|
GridView {
|
|
id: bgmap_01
|
|
visible: true
|
|
smooth: false
|
|
enabled: false
|
|
keyNavigationWraps: false
|
|
interactive: false
|
|
anchors.fill: parent
|
|
flickableDirection: Flickable.VerticalFlick
|
|
delegate: Item {
|
|
x: 5
|
|
height: 50
|
|
Column {
|
|
width: 8
|
|
height: 8
|
|
spacing: 0
|
|
Rectangle {
|
|
x: 0
|
|
width: 8
|
|
height: 8
|
|
color: colorCode
|
|
border.width: 1
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
}
|
|
}
|
|
}
|
|
cellWidth: 8
|
|
model: ListModel {
|
|
ListElement {
|
|
name: "Grey"
|
|
colorCode: "grey"
|
|
}
|
|
|
|
ListElement {
|
|
name: "Red"
|
|
colorCode: "red"
|
|
}
|
|
|
|
ListElement {
|
|
name: "Blue"
|
|
colorCode: "blue"
|
|
}
|
|
|
|
ListElement {
|
|
name: "Green"
|
|
colorCode: "green"
|
|
}
|
|
}
|
|
cellHeight: 8
|
|
}
|
|
}
|