本文整理汇总了Python中ErrorMessageClass.show方法的典型用法代码示例。如果您正苦于以下问题:Python ErrorMessageClass.show方法的具体用法?Python ErrorMessageClass.show怎么用?Python ErrorMessageClass.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorMessageClass
的用法示例。
在下文中一共展示了ErrorMessageClass.show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: import ErrorMessageClass [as 别名]
# 或者: from ErrorMessageClass import show [as 别名]
class MainWindow(QMainWindow):
"""This class creates the Main window"""
def __init__(self):
super().__init__()
check_date()
add_admin_employee()
settings = getSettings()
self.setStyleSheet(css)
self.connection = SQLConnection("ProductDatabase.db")
open_db = self.connection.open_database()
self.Settings()
self.stacked_layout = QStackedLayout()
self.add_product()
self.edit_product()
self.delete_product()
self.manage_stock()
self.create_order()
self.add_member()
self.edit_member()
self.delete_member()
self.add_employee()
self.edit_employee()
self.delete_employee()
self.preferences()
self.log_in()
self.password_reset()
self.change_password()
self.widget = QWidget()
self.widget.setLayout(self.stacked_layout)
#Adding The Custom TitleBar
self.setWindowFlags(Qt.FramelessWindowHint)
self.title_bar = TitleBar()
self.title_bar.minimise.clicked.connect(self.minimise_main_window)
self.title_bar.close.clicked.connect(self.close_main_window)
self.main_layout = QVBoxLayout()
self.main_widget = QWidget()
self.main_layout.addWidget(self.title_bar)
self.main_layout.addWidget(self.menu)
self.main_layout.addWidget(self.widget)
self.main_widget.setLayout(self.main_layout)
self.setCentralWidget(self.main_widget)
self.log_in_function()
if settings:
self.setWindowTitle("Beacon Vets Stock Control")
self.icon = QIcon("{0}".format(str(settings[0][1])))
else:
self.icon = QIcon("")
self.setWindowIcon(self.icon)
def minimise_main_window(self):
self.showMinimized()
def close_main_window(self):
self.close()
def mousePressEvent(self,event):
if event.button() == Qt.LeftButton:
self.moving = True; self.offset = event.pos()
def mouseMoveEvent(self,event):
try:
if self.moving:
self.move(event.globalPos()-self.offset)
except AttributeError:
pass
def create_title(self):
self.title = QLabel("Default Text")
self.title.setAlignment(Qt.AlignCenter)
self.title.setObjectName('title')
return self.title
def add_product(self):
self.title = self.create_title()
self.title.setText("Add Product ")
self.add_product_instance = addProductClass("Add Product")
product_name_info = self.add_product_instance.product_name.text()
self.add_product_layout = QVBoxLayout()
self.add_product_layout.addWidget(self.title)
self.add_product_layout.addWidget(self.add_product_instance)
self.add_product_widget = QWidget()
self.add_product_widget.setLayout(self.add_product_layout)
self.setCentralWidget(self.add_product_widget)
self.stacked_layout.addWidget(self.add_product_widget)
def edit_product(self):
self.title = self.create_title()
#.........这里部分代码省略.........