qskinny/examples/glabels/glabels.qml

45 lines
1.0 KiB
QML
Raw Normal View History

2017-07-21 18:21:34 +02:00
import QtQuick 2.0
import Skinny 1.0 as Qsk
import "qrc:/qml"
Qsk.Window
{
visible: true
width: 600
height: 600
Qsk.LinearBox
{
orientation: Qt.Horizontal
panel: true
2017-07-21 18:21:34 +02:00
dimension: 3
//padding: 10
padding { left: 10; top: 10; right: 10; bottom: 10 }
2017-07-21 18:21:34 +02:00
spacing: 20
Repeater
{
model: [
"image://shapes/rectangle/royalblue",
"image://shapes/triangleright/thistle",
"image://shapes/ellipse/khaki",
"image://shapes/ring/sandybrown",
"image://shapes/star/darkviolet",
"image://shapes/hexagon/darkslategray"
]
Qsk.GraphicLabel
{
source: modelData
2022-11-13 17:26:44 +01:00
graphicStrutSize.width: 100 // height: according to aspect ratio
2017-07-21 18:21:34 +02:00
fillMode: Qsk.GraphicLabel.PreserveAspectFit
alignment: Qt.AlignCenter
//mirror: true
}
}
}
}