Wizard dialog remember his size.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 May 2010 08:00:21 +0000 (08:00 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 May 2010 08:00:21 +0000 (08:00 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3852 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BWizard.py

index 4fd560354d3a7b2ab86bd1a68782823169727682..843630059cc9dda991b96de6de3d5cb71fae0ff0 100644 (file)
@@ -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)