From 81dd8b3c42c13afc37f14b89f9638f2f4906657a Mon Sep 17 00:00:00 2001 From: duplo Date: Thu, 11 Nov 2010 10:36:33 +0000 Subject: [PATCH] Attempt to use window manager's default positioning, the first time the wizard is launched. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4549 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BWizard.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wizard/BWizard.py b/wizard/BWizard.py index 925ff75e..cd81960e 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -50,8 +50,10 @@ class BWizard(QWizard): def __init__(self, page_list): self._current = None QWizard.__init__(self) - geometry = QApplication.instance().settings.value("geometry", QVariant()).toRect() - self.setGeometry(geometry) + geometry = QApplication.instance().settings.value("geometry", None) + if geometry: + geometry = geometry.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) -- 2.25.1