added and use constants for default sub window size

This commit is contained in:
2023-05-23 10:19:52 +02:00
parent dcc554eab8
commit d958d89da4

View File

@ -4,12 +4,17 @@ from PyQt5.QtWidgets import QMdiSubWindow
from .. import assets
SUB_WIN_WIDTH = 640
SUB_WIN_HEIGHT = 480
class MDISubWindow(QMdiSubWindow):
def __init__(self, title, *args, **kwargs):
super().__init__(*args, **kwargs)
self.setWindowTitle(title)
self.setWindowIcon(assets.char())
self.resize(SUB_WIN_WIDTH, SUB_WIN_HEIGHT)
# without this, the SubWindow is not removed from the subWindowList
self.setAttribute(Qt.WA_DeleteOnClose)