Implement custom close dialog
This commit is contained in:
parent
97b16d1856
commit
7b7b92b6a3
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue