From: duplo Date: Thu, 27 May 2010 08:00:21 +0000 (+0000) Subject: Wizard dialog remember his size. X-Git-Tag: 2.5.0~65 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=a8401e611c8bf43c90444e48ba6a5fa564564bb1;p=bertos.git Wizard dialog remember his size. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3852 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BWizard.py b/wizard/BWizard.py index 4fd56035..84363005 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -50,7 +50,8 @@ class BWizard(QWizard): def __init__(self, page_list): QWizard.__init__(self) - self.setFixedSize(800, 500) + geometry = QApplication.instance().settings.value("geometry", QVariant()).toRect() + self.setGeometry(geometry) self.setWindowTitle(self.tr("Create a BeRTOS project - rev.%1").arg(wizard_version)) self.setWindowIcon(QIcon(":/images/appicon.png")) self.setOption(QWizard.DisabledBackButtonOnLastPage, True) @@ -89,3 +90,8 @@ class BWizard(QWizard): Returns the BProject associated with the wizard. """ return copy.deepcopy(QApplication.instance().project) + + def done(self, result): + geometry = self.geometry() + QApplication.instance().settings.setValue("geometry", geometry) + QWizard.done(self, result)