def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def closeEvent(self, event: QCloseEvent):
        settings.write("{}/geometry".format(self.__class__.__name__), self.saveGeometry())
        super().closeEvent(event)