Important: Please read the Qt Code of Conduct -

QWizard and QWizardPage size/layout

  • Hello everyone,
    My problem is related to how QWizard works together with QWizardPage from the layout standing point of view.

    I've created a derived class of QWizard and added two simple QWizardPages.
    The first QWizardPage has some labels and textedits insdide a grid layout.
    For technical reasons I don't want the user able to resize vertically the QWizard once shown. So as one of the last instruction inside the constructor of my QWizard derived class I call setFixedSize( sizehint().height() ) in order to fix the size vertically.
    It works, I mean I cannot resize vertically my wizard, but at the same time QWizard shrinks, verticallly, the first QWizardPage getting an undesirable shape of it: the labels are very close to each other and the text edit boxes are so smaller in height that is almost impossible to see the content.
    I also gave a look at the LicenseWizard example provided with QT. The first QWizardPage works as I would desire in my example. There probably QWizard recognizes that the first QWizardPage has a watermark on the left side and as such and it set the layout and resizing properly.
    How can I reach the same effect on my example?
    And if possible, what I did wrong in my example?

    P.S. all controls' properties on my QwizardPage were left with default values.

    Thank you