Added new qml module for drawing lines

This commit is contained in:
2025-03-09 11:48:38 +01:00
parent 68ea794119
commit 4c4d85a78d
8 changed files with 101 additions and 7 deletions

View File

@ -1,11 +1,12 @@
import QtQuick 2.3
import LineItem 1.0
Rectangle {
color: "gray"
Flickable {
width: parent.width;
height: parent.height
contentWidth: 2500; contentHeight: 1500
contentWidth: 2500*4; contentHeight: 1500*4
flickDeceleration: 10000
leftMargin: Math.max((width - contentWidth)/2,0)
topMargin: Math.max((height - contentHeight)/2,0)
@ -16,10 +17,10 @@ Rectangle {
id: contentRect
anchors.top: parent.top
anchors.left: parent.left
width: parent.width
height: parent.height
width: parent.width/4
height: parent.height/4
transform: Scale {yScale: 1; xScale: 1}
transform: Scale {yScale: 4; xScale: 4}
transformOrigin: Item.TopLeft
Row {
@ -43,6 +44,10 @@ Rectangle {
text: "Hello, World!"
}
}
LineItem {
height: 100
width: 100
}
}
}
}