Add closeEvents to dialogs and set the deleteLater command

This commit is contained in:
Veronica Berglyd Olsen
2023-11-28 16:29:21 +01:00
parent 50a9b5b5e2
commit ff7f27ff97
20 changed files with 144 additions and 106 deletions
+2 -12
View File
@@ -30,7 +30,7 @@ from datetime import datetime
from urllib.request import Request, urlopen
from PyQt5.QtGui import QCloseEvent, QCursor
from PyQt5.QtCore import Qt, pyqtSlot
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (
QWidget, qApp, QDialog, QHBoxLayout, QVBoxLayout, QDialogButtonBox, QLabel
)
@@ -95,7 +95,7 @@ class GuiUpdates(QDialog):
# Buttons
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Close)
self.buttonBox.rejected.connect(self._doClose)
self.buttonBox.rejected.connect(self.close)
# Assemble
self.innerBox = QHBoxLayout()
@@ -169,14 +169,4 @@ class GuiUpdates(QDialog):
self.deleteLater()
return
##
# Private Slots
##
@pyqtSlot()
def _doClose(self) -> None:
"""Close the dialog."""
self.close()
return
# END Class GuiUpdates