0

How can I adjust the button width (back, next buttons) of a QWizard. Is there any style sheet (qss) option I can use, or do I have to identify the buttons and set the widget width?

The stylesheet approach would be best.

Horst Walter
  • 13,663
  • 32
  • 126
  • 228

1 Answers1

1

You have to get the buttons using the button() method of QWizard and set a fixed width:

your_wizard->button(QWizard::BackButton)->setFixedWidth(the_width)
your_wizard->button(QWizard::NextButton)->setFixedWidth(the_width)
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • That is the 2nd best solution if I cannot do it with a qss style sheet. I mean an external style sheet which selects the wizard, then the button. The problem is to just select the NEXT, BACK ... buttons and not any other button. – Horst Walter Mar 22 '19 at 13:48
  • 1
    @HorstWalter Well, there is no selector in QSS for the QWizard buttons so QSS will not work – eyllanesc Mar 22 '19 at 17:19