Rectangle {
id: left
x: 25
y: 25
width: 150
height: 150
color: focus ? "red" : "darkred"
KeyNavigation.right: right
focus: true
}
Rectangle {
id: right
x: 225
y: 25
width: 150
...
21 Mart 2018 Çarşamba
Qml KeyNavigaiton Examples
TextInput {
id: name
text: "name"
focus: true
KeyNavigation.tab: adress
}
TextInput {
id: adress
text: "addressss"
KeyNavigation.backtab: name
...
QML Mouse Area Examples 3
Text {
id: title
text: qsTr("Qt Quick ")
x: 50
y: 25
font.family: "Helvetica"
font.pixelSize: 50
MouseArea {
anchors.fill: parent
onPressed: parent.color = "green"
onReleased: parent.color = "red"
}
}
Rectangle {
x: 50
y: 200
width: 100
height: 50
color:...
QML Position Example 2
Image {
source: {
if (Screen.PixelDensity < 40)
"image_low_dpi.png"
else if (Screen.PixelDensity > 300) // Pixele göre resim kullanılıyor
"image_high_dpi.png"
else
"image.png"
}
...
QML Position Examples
ApplicationWindow {
id: root
visible: true
width: 480
height: 620
GridLayout {
anchors.fill: parent
anchors.margins: 20
rowSpacing: 20
columnSpacing: 20
flow: width > height ? GridLayout.LeftToRight : GridLayout.TopToBottom // IMPORTANT
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
...