-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.qml
79 lines (67 loc) · 1.74 KB
/
Main.qml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtAndroidViewShare
Window {
width: 640
height: 480
visible: true
title: qsTr("QtAndroidViewShare")
Label {
id: title
text: "QtAndroidViewShare Example"
anchors.top: parent.top
anchors.topMargin: 20
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
id: imgView
anchors.left: parent.left
anchors.top: title.bottom
anchors.margins: 10
width: 150
height: 40
text: "View image"
onClicked: {
ShareUtils.viewFile(ResourceCreator.imgPath(), "View File",
"image/png", 1)
}
}
Button {
id: imgShare
anchors.right: parent.right
anchors.top: title.bottom
anchors.margins: 10
width: 150
height: 40
text: "Share image"
onClicked: {
ShareUtils.sendFile(ResourceCreator.imgPath(), "View File",
"image/png", 2)
}
}
Button {
anchors.left: parent.left
anchors.top: imgView.bottom
anchors.margins: 10
width: 150
height: 40
text: "View PDF"
onClicked: {
ShareUtils.viewFile(ResourceCreator.pdfPath(), "View File",
"application/pdf", 3)
}
}
Button {
anchors.right: parent.right
anchors.top: imgShare.bottom
anchors.margins: 10
width: 150
height: 40
text: "Share PDF"
onClicked: {
ShareUtils.sendFile(ResourceCreator.pdfPath(), "View File",
"application/pdf", 4)
}
}
}