From: duplo Date: Wed, 31 Mar 2010 09:43:22 +0000 (+0000) Subject: Add infrastructure for non-linear Wizard. X-Git-Tag: 2.5.0~570 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=84c2876a43e9aadb52f39c84afacef3f67bcf2a2;p=bertos.git Add infrastructure for non-linear Wizard. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3338 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BWizard.py b/wizard/BWizard.py index 096d071d..11a2dd26 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -69,8 +69,12 @@ class BWizard(QWizard): """ Adds the pages in the wizard. """ - for page in page_list: - self.addPage(page()) + self._page_list = page_list + for i, page in enumerate(self._page_list): + self.setPage(i, page()) + + def pageIndex(self, page_class): + return self._page_list.index(page_class) def connectSignals(self): """