Question

Python 3.3, PyQt 4.8.4. My knowledge of PyQt and Python (and English, I think;)) isn't good, so there are many questions in my studies. I made a draft in Qt Designer, still I can't understand how to make it work properly. I have wizard, on the first page - 2 QSpinBoxes, second - generated quantity of spinboxes, equals to the entered values in boxes on the first page. Tried to search about signals and slots, but still can't understand.

  1. How to get this value inside my program, to use it for generation of spinboxes on the 2nd page?
  2. Of course, I need to keep other pages out of reach while this first value isn't correct. I think that can be realized by keeping NextButton unavailable, but how - I don't know. Need kind of help!)

My code itself http://pastebin.com/UxvzFvJR

Launcher was made separately http://pastebin.com/2sYtyg9z

Was it helpful?

Solution

1: Move your spinboxes generate code(line list_x = [] to f += 1) to page2's initializePage. Dirty but works:

class Ui_Wizard(object):
    def addSpins(self):
        list_x = []
        ...

    ...
    self.wizardPage2.initializePage = self.addSpins

2: Register them as mandatory field:

self.wizardPage1.registerField("cols*", self.spinBox_col)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top