2019-07-09 10:16:04 +02:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Skinny 1.0
|
|
|
|
import Test 1.0
|
|
|
|
|
|
|
|
GridBox
|
|
|
|
{
|
2022-11-29 17:24:40 +01:00
|
|
|
//margins: 10 // only possible with Qt <= 6.1 || Qt >= 6.5
|
2021-10-07 12:29:42 +02:00
|
|
|
margins { left: 10; top: 10; right: 10; bottom: 10 }
|
|
|
|
|
2022-11-30 17:05:37 +01:00
|
|
|
background:
|
|
|
|
({
|
|
|
|
linear: { x1: 0, y1: 0, x2: 1, y2: 1 }, // diagonal
|
2022-11-13 10:09:18 +01:00
|
|
|
|
2019-07-09 12:10:55 +02:00
|
|
|
stops: [
|
2021-10-27 15:08:06 +02:00
|
|
|
{ position: 0.0, color: "Red" },
|
2022-11-30 17:05:37 +01:00
|
|
|
{ position: 1.0, color: "Yellow" }
|
2019-07-09 12:10:55 +02:00
|
|
|
]
|
2022-11-30 17:05:37 +01:00
|
|
|
})
|
2019-07-09 12:10:55 +02:00
|
|
|
|
|
|
|
TestRectangle
|
|
|
|
{
|
|
|
|
id: paleVioletRed
|
|
|
|
color: "PaleVioletRed"
|
|
|
|
}
|
|
|
|
|
|
|
|
TestRectangle
|
2019-07-09 10:16:04 +02:00
|
|
|
{
|
|
|
|
id: darkSeaGreen
|
2019-07-09 12:10:55 +02:00
|
|
|
color: "DarkSeaGreen"
|
2019-07-09 10:16:04 +02:00
|
|
|
}
|
|
|
|
|
2019-07-09 12:10:55 +02:00
|
|
|
TestRectangle
|
2019-07-09 10:16:04 +02:00
|
|
|
{
|
|
|
|
id: skyBlue
|
2019-07-09 12:10:55 +02:00
|
|
|
color: "SkyBlue"
|
2019-07-09 10:16:04 +02:00
|
|
|
}
|
|
|
|
|
2019-07-09 12:10:55 +02:00
|
|
|
TestRectangle
|
2019-07-09 10:16:04 +02:00
|
|
|
{
|
|
|
|
id: navajoWhite
|
2019-07-09 12:10:55 +02:00
|
|
|
color: "NavajoWhite"
|
2019-07-09 10:16:04 +02:00
|
|
|
}
|
|
|
|
|
2019-07-09 12:10:55 +02:00
|
|
|
Component.onCompleted:
|
|
|
|
{
|
|
|
|
addItem( paleVioletRed, 0, 0, 1, 2 );
|
2019-07-09 10:16:04 +02:00
|
|
|
addItem( darkSeaGreen, 1, 0, 2, 1 );
|
|
|
|
addItem( skyBlue, 2, 1, 1, 1 );
|
|
|
|
addItem( navajoWhite, 0, 2, -1, 1 );
|
|
|
|
|
|
|
|
setRowStretchFactor( 0, 1 );
|
|
|
|
setRowStretchFactor( 1, 2 );
|
|
|
|
setRowStretchFactor( 2, 1 );
|
2019-07-09 12:10:55 +02:00
|
|
|
}
|
2019-07-09 10:16:04 +02:00
|
|
|
}
|
|
|
|
|