Search code examples
pythonpyqtqt4pysideqwizard

QWizard: Change height/dimensions of title field


I'm currently trying to implement a simple "First steps" Wizard for a Python/Qt application I'm working on. This is really easy to do with Designer, but as usual the devil lies in the details. My problem is that the 'Title' field is way too big for me (~50% of the available screen estate). Here is a screenshot, and there the *.ui-file.

I've already had a look at all the QWizard/QWizardPage properties and couldn't find anything that referred to the size/styling of the 'Title' field. Is there any way to do this (maybe using a custom stylesheet?) or am I out of luck?


Solution

  • The title label is in an internal QGridLayout, and unless you either add a layout to the page (or explicitly set the vertical size policy of the page to MinimumExpanding or Expanding) to force the grid cell containing the page to expand, the title will always take 50% of the total height.