-
Notifications
You must be signed in to change notification settings - Fork 0
/
alert.py
43 lines (33 loc) · 1.34 KB
/
alert.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'temp/alert.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class alertclass(object):
def alertwindow(self, Dialog,alerttext):
Dialog.setObjectName("Dialog")
Dialog.resize(300, 300)
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(50, 50, 250, 250))
self.label.setSizeIncrement(QtCore.QSize(0, 25))
font = QtGui.QFont()
font.setPointSize(10)
self.label.setFont(font)
self.label.setObjectName("label")
self.retranslateUi(Dialog,alerttext)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog,alerttext):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "ALERT"))
self.label.setText(_translate("Dialog", alerttext))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = alertclass()
ui.alertclass(Dialog)
Dialog.show()
sys.exit(app.exec_())