Added basic GUI
This commit is contained in:
66
ui_connerror.py
Normal file
66
ui_connerror.py
Normal file
@@ -0,0 +1,66 @@
|
||||
from PySide6.QtCore import (QCoreApplication, QMetaObject, QRect, Qt)
|
||||
from PySide6.QtGui import (QFont)
|
||||
from PySide6.QtWidgets import (QDialogButtonBox, QLabel)
|
||||
|
||||
class Ui_connerrorDialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
if not Dialog.objectName():
|
||||
Dialog.setObjectName(u"Dialog")
|
||||
Dialog.resize(320, 160)
|
||||
|
||||
# Set the window flags to remove the title bar
|
||||
Dialog.setWindowFlags(Qt.WindowType.FramelessWindowHint)
|
||||
|
||||
font = QFont()
|
||||
font.setFamilies([u"Optimism Sans"])
|
||||
font.setPointSize(8)
|
||||
font.setBold(True)
|
||||
Dialog.setFont(font)
|
||||
|
||||
dialog_style_sheet = f"""
|
||||
QDialog {{
|
||||
background-image: url("");
|
||||
background-color: #FF80D4;
|
||||
border: 1px solid #FF33BB;
|
||||
border-radius: 10px;
|
||||
}}
|
||||
"""
|
||||
|
||||
Dialog.setStyleSheet(dialog_style_sheet)
|
||||
|
||||
self.buttonBox = QDialogButtonBox(Dialog)
|
||||
self.buttonBox.setObjectName(u"buttonBox")
|
||||
self.buttonBox.setFont(font)
|
||||
self.buttonBox.setGeometry(QRect(10, 120, 300, 30))
|
||||
self.buttonBox.setOrientation(Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QDialogButtonBox.Ok)
|
||||
self.buttonBox.setCenterButtons(True)
|
||||
|
||||
button_style = """
|
||||
QPushButton {
|
||||
background-color: #FF80D4;
|
||||
border: 1px solid #FF33BB;
|
||||
border-radius: 1px;
|
||||
padding: 10px 20px 10px 20px;
|
||||
}
|
||||
"""
|
||||
|
||||
self.buttonBox.setStyleSheet(button_style)
|
||||
|
||||
self.label = QLabel(Dialog)
|
||||
self.label.setObjectName(u"label")
|
||||
self.label.setFont(font)
|
||||
self.label.setGeometry(QRect(10, 40, 300, 50))
|
||||
self.label.setAlignment(Qt.AlignCenter)
|
||||
self.label.setWordWrap(True)
|
||||
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.buttonBox.accepted.connect(Dialog.accept)
|
||||
|
||||
QMetaObject.connectSlotsByName(Dialog)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
self.label.setText(QCoreApplication.translate("Dialog", u"COULDN'T CONNECT TO DSO80204B", None))
|
||||
# retranslateUi
|
||||
Reference in New Issue
Block a user