I'm working on a project that basically follows a pre-defined structure, like a state machine or a wizard. I stumbled upon QWizard, its nextId() function seemed to be a good way to make my wizard dyamically load further pages. Now, it would be very nice to go back to earlier, already visited pages of the wizard. But even with overloaded nextId() I can't go back to that already visited pages.
Is is possible to clear the visited pages history? Or is there a better way to do this?
I use Qt by PyQt4 in Python, but that should make that much of a difference. Another way to do what I ask would be to add a similar page to the wizard and share the previous data with this page, but coming from mostly C++ I don't like the way to create dummy objects that mimic originals.
Edit:
What I'm trying to do is to replicate a state machine with QWizard (because it almost is a state machine). For example, on page 1 data is loaded, then on page 2 additional computations happen that potentially extend page 1 data. By using the back button I can go back to page 1, but I can not "go back" with the next button because page 1 is already visited at this point. I tried it by overloading the nextId() functions but it doesn't work. This means I can not build a cyclic order of pages, which I would like to do.
I'm not sure I see the logical connection between the different questions you're asking here. If you want to go back to already visited pages, why do you want to delete the history?
With the help of overloading the nextID method of either the QWizard or separate QWizardPages you can easily implement any custom visiting order you desire. Use the hasVisitedPage method to find out whether some page was already visited. visitedPages returns the list of IDs of visited pages, in the order in which the pages were visited.
What else do you need?
QWizard: delete history of visited pages