2017-07-21 18:21:34 +02:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Skinny 1.0 as Qsk
|
2017-07-24 07:48:36 +02:00
|
|
|
import Images 1.0
|
2017-07-21 18:21:34 +02:00
|
|
|
import "qrc:/qml"
|
|
|
|
|
|
|
|
Qsk.Window
|
|
|
|
{
|
|
|
|
visible: true
|
|
|
|
|
|
|
|
width: 600
|
|
|
|
height: 600
|
|
|
|
|
|
|
|
color: "Beige"
|
|
|
|
|
|
|
|
Qsk.LinearBox
|
|
|
|
{
|
|
|
|
orientation: Qt.Horizontal
|
|
|
|
dimension: 3
|
|
|
|
|
2022-04-01 14:53:20 +02:00
|
|
|
//margins: 10 // only possible with Qt <= 6.1
|
|
|
|
margins { left: 10; top: 10; right: 10; bottom: 10 }
|
2017-07-21 18:21:34 +02:00
|
|
|
spacing: 10
|
|
|
|
|
|
|
|
Repeater
|
|
|
|
{
|
|
|
|
model: [
|
|
|
|
"image://shapes/rectangle/royalblue",
|
|
|
|
"image://shapes/triangleup/thistle",
|
|
|
|
"image://shapes/ellipse/khaki",
|
|
|
|
"image://shapes/ring/sandybrown",
|
|
|
|
"image://shapes/star/darkviolet",
|
|
|
|
"image://shapes/triangleright/darkslategray"
|
|
|
|
]
|
|
|
|
|
|
|
|
// We could also use Qt.Image with binding sourceWidth/sourceHeight
|
|
|
|
// to width/height, but Qsk.Image avoids several pointless
|
|
|
|
// image updates for this use case
|
|
|
|
|
2017-07-24 07:48:36 +02:00
|
|
|
Image
|
2017-07-21 18:21:34 +02:00
|
|
|
{
|
|
|
|
source: modelData
|
|
|
|
|
|
|
|
cache: false // does not make much sense for textures
|
|
|
|
|
|
|
|
// vector graphics are ususally scalable and requesting
|
|
|
|
// the image in a different size from the image provider
|
|
|
|
// makes a lot more sense, than scaling the texture/pixmap.
|
|
|
|
// Changing the sourceSize does this and sourceSizeAdjustment
|
|
|
|
// automatically modifies the sourceSize according to
|
|
|
|
// the size of the item
|
|
|
|
|
|
|
|
sourceSizeAdjustment: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|