From 0e0032e020d0105c957544676fe4358b11a8ff7d Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Mon, 17 Aug 2020 20:39:39 +0200 Subject: [PATCH] Some minor cleanup of the code --- nw/error.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nw/error.py b/nw/error.py index 869ffdaf..e549fd26 100644 --- a/nw/error.py +++ b/nw/error.py @@ -36,8 +36,7 @@ class NWErrorMessage(QDialog): def __init__(self, parent): QDialog.__init__(self, parent=parent) - self.mainBox = QGridLayout() - + # Widgets self.msgIcon = QLabel() self.msgIcon.setPixmap( qApp.style().standardIcon(QStyle.SP_MessageBoxCritical).pixmap(64, 64) @@ -52,6 +51,8 @@ class NWErrorMessage(QDialog): self.btnBox = QDialogButtonBox(QDialogButtonBox.Close) self.btnBox.rejected.connect(self._doClose) + # Assemble + self.mainBox = QGridLayout() self.mainBox.addWidget(self.msgIcon, 0, 0, 2, 1, Qt.AlignTop) self.mainBox.addWidget(self.msgHead, 0, 1, 1, 1, Qt.AlignTop) self.mainBox.addWidget(self.msgBody, 1, 1, 1, 1) @@ -60,7 +61,6 @@ class NWErrorMessage(QDialog): self.setLayout(self.mainBox) - # self.setIcon(QMessageBox.Critical) self.setMinimumWidth(500) self.setMinimumHeight(300) self.setSizeGripEnabled(True)