|
@ -202,6 +202,10 @@ class MessageBoxMixin(object): |
|
|
def msg_box(self, icon, parent, title, text, buttons=QMessageBox.Ok, |
|
|
def msg_box(self, icon, parent, title, text, buttons=QMessageBox.Ok, |
|
|
defaultButton=QMessageBox.NoButton): |
|
|
defaultButton=QMessageBox.NoButton): |
|
|
parent = parent or self.top_level_window() |
|
|
parent = parent or self.top_level_window() |
|
|
|
|
|
if type(icon) is QPixmap: |
|
|
|
|
|
d = QMessageBox(QMessageBox.Information, title, str(text), buttons, parent) |
|
|
|
|
|
d.setIconPixmap(icon) |
|
|
|
|
|
else: |
|
|
d = QMessageBox(icon, title, str(text), buttons, parent) |
|
|
d = QMessageBox(icon, title, str(text), buttons, parent) |
|
|
d.setWindowModality(Qt.WindowModal) |
|
|
d.setWindowModality(Qt.WindowModal) |
|
|
d.setDefaultButton(defaultButton) |
|
|
d.setDefaultButton(defaultButton) |
|
|