forked from PyQt5/PyQt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UiNotify.py
111 lines (103 loc) · 4.39 KB
/
UiNotify.py
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'notify.ui'
#
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_NotifyForm(object):
def setupUi(self, NotifyForm):
NotifyForm.setObjectName("NotifyForm")
NotifyForm.resize(300, 200)
NotifyForm.setStyleSheet("QWidget#widgetTitle {\n"
" background-color: rgb(76, 169, 106);\n"
"}\n"
"QWidget#widgetBottom {\n"
" border-top-style: solid;\n"
" border-top-width: 2px;\n"
" border-top-color: rgb(185, 218, 201);\n"
"}\n"
"QLabel#labelTitle {\n"
" color: rgb(255, 255, 255);\n"
"}\n"
"QLabel#labelContent {\n"
" padding: 5px;\n"
"}\n"
"QPushButton {\n"
" border: none;\n"
" background: transparent;\n"
"}\n"
"QPushButton#buttonClose {\n"
" font-family: \"webdings\";\n"
" color: rgb(255, 255, 255);\n"
"}\n"
"QPushButton#buttonClose:hover {\n"
" background-color: rgb(212, 64, 39);\n"
"}\n"
"QPushButton#buttonView {\n"
" color: rgb(255, 255, 255);\n"
" border-radius: 5px;\n"
" border: solid 1px rgb(76, 169, 106);\n"
" background-color: rgb(76, 169, 106);\n"
"}\n"
"QPushButton#buttonView:hover {\n"
" color: rgb(0, 0, 0);\n"
"}")
self.verticalLayout = QtWidgets.QVBoxLayout(NotifyForm)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName("verticalLayout")
self.widgetTitle = QtWidgets.QWidget(NotifyForm)
self.widgetTitle.setMinimumSize(QtCore.QSize(0, 26))
self.widgetTitle.setObjectName("widgetTitle")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.widgetTitle)
self.horizontalLayout_3.setContentsMargins(10, 0, 0, 0)
self.horizontalLayout_3.setSpacing(0)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.labelTitle = QtWidgets.QLabel(self.widgetTitle)
self.labelTitle.setText("")
self.labelTitle.setObjectName("labelTitle")
self.horizontalLayout_3.addWidget(self.labelTitle)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem)
self.buttonClose = QtWidgets.QPushButton(self.widgetTitle)
self.buttonClose.setMinimumSize(QtCore.QSize(26, 26))
self.buttonClose.setMaximumSize(QtCore.QSize(26, 26))
self.buttonClose.setObjectName("buttonClose")
self.horizontalLayout_3.addWidget(self.buttonClose)
self.verticalLayout.addWidget(self.widgetTitle)
self.labelContent = QtWidgets.QLabel(NotifyForm)
self.labelContent.setText("")
self.labelContent.setWordWrap(True)
self.labelContent.setObjectName("labelContent")
self.verticalLayout.addWidget(self.labelContent)
self.widgetBottom = QtWidgets.QWidget(NotifyForm)
self.widgetBottom.setObjectName("widgetBottom")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widgetBottom)
self.horizontalLayout.setContentsMargins(0, 5, 5, 5)
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem1 = QtWidgets.QSpacerItem(170, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.buttonView = QtWidgets.QPushButton(self.widgetBottom)
self.buttonView.setMinimumSize(QtCore.QSize(75, 25))
self.buttonView.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.buttonView.setObjectName("buttonView")
self.horizontalLayout.addWidget(self.buttonView)
self.verticalLayout.addWidget(self.widgetBottom)
self.verticalLayout.setStretch(1, 1)
self.retranslateUi(NotifyForm)
QtCore.QMetaObject.connectSlotsByName(NotifyForm)
def retranslateUi(self, NotifyForm):
_translate = QtCore.QCoreApplication.translate
NotifyForm.setWindowTitle(_translate("NotifyForm", "消息提示"))
self.buttonClose.setText(_translate("NotifyForm", "r"))
self.buttonView.setText(_translate("NotifyForm", "查 看"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
NotifyForm = QtWidgets.QWidget()
ui = Ui_NotifyForm()
ui.setupUi(NotifyForm)
NotifyForm.show()
sys.exit(app.exec_())