Implement custom close dialog

This commit is contained in:
Marcel Kapfer 2020-09-11 00:07:07 +02:00
parent 97b16d1856
commit 7b7b92b6a3
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -29,6 +29,7 @@ from ui_mainwindow import Ui_MainWindow
from ui_code_dialog import Ui_WikiCode
from ui_about_dialog import Ui_About
from ui_clear_dialog import Ui_ClearDialog
from ui_close_dialog import Ui_CloseDialog
class AboutDialog(QDialog, Ui_About):
def __init__(self, *args, **kwargs):
@ -39,6 +40,16 @@ class AboutDialog(QDialog, Ui_About):
self.show()
class CloseDialog(QDialog, Ui_CloseDialog):
def __init__(self, *args, **kwargs):
super(CloseDialog, self).__init__(*args, **kwargs)
self.setupUi(self)
self.b_yes.clicked.connect(self.accept)
self.b_no.clicked.connect(self.reject)
self.show()
class ClearDialog(QDialog, Ui_ClearDialog):
def __init__(self, *args, **kwargs):
super(ClearDialog, self).__init__(*args, **kwargs)