blob: c73c3d91f5a2d73437da36ed67c601459b0795e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
import QtQuick 2.0
import CursorNavigation 1.0
import QtQuick.Layouts 1.3
import "../controls"
Item {
Text {
id: text
text: "CursorNavigation allows passing the navigable items information about cursor's intended or actual movement. This example demonstrates a button that uses cursor's magnitude and movement information to implement a flipping motion that follows the cursor's direction."
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
wrapMode: Text.WordWrap
}
Item {
anchors.top: text.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
GridLayout {
columns: 4
rows: 4
rowSpacing: 10
columnSpacing: 10
anchors.centerIn: parent
Repeater {
CNFlipButton {
Layout.minimumWidth: 110
Layout.minimumHeight: 110
text: "Button " + index
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
}
model: 16
}
}
}
}
|