-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubmitPage.qml
54 lines (52 loc) · 1.55 KB
/
SubmitPage.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
import QtQuick 2.0
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
Page {
id: subpage
width: mainwindow.width
height: mainwindow.height
property bool signup: false
property real cmid: 0
ColumnLayout {
id: login
width: parent.width / 3
height: parent.height / 3
anchors.centerIn: parent
Label {
text: "Title"
}
TextField {
id: titletext
Layout.fillWidth: true
placeholderText: "Enter Title"
}
Label {
text: "URL"
}
TextField {
id: urltext
Layout.fillWidth: true
placeholderText: "Enter URL"
}
MyButton {
Layout.fillWidth: true
Layout.preferredHeight: 50
// texticon.text: "\ue804"
// texticon.visible: true
contentText.text: "Submit"
contentText.color: "#FAFAFA"
contentText.font.pixelSize: 17
contentText.font.bold: Font.Medium
bgitem.color: "#f56565"
bgitem.border.width: 0
bgitem.border.color: "#f56565"
onClicked: {
++cmid;
newsmodel.insert(cmid, loginhandler.username, urltext.text, titletext.text, "now", 0, 0)
// model1.insert(0, {url: urltext.text, title: titletext.text, comment: 0, points: 0, date: "now", author: "SeedPuller"})
stackView.pop()
toolbar.tbar.currentIndex = 0
}
}
}
}