From a8401e611c8bf43c90444e48ba6a5fa564564bb1 Mon Sep 17 00:00:00 2001 From: duplo Date: Thu, 27 May 2010 08:00:21 +0000 Subject: [PATCH] Wizard dialog remember his size. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3852 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BWizard.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) -- 2.25.1