Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-35647

setFont doesn't work for Commit and Finish QWizard buttons when style sheet is set on QWizard

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.8.5, 5.2.0
    • Win 7 64bit - MSVS2012 32bit

    Description

      Steps to reproduce using qtbug35647.zip:

      • Click through wizard, note all buttons have large fonts except "Finish"
      • Relaunch with cmd line option -s, clearing the style sheet. All buttons have large fonts.

      Note this only works in 5.1.1.

      Generate QWizard class/form from File->New File or Project menu.
      Then in its creator try:

      ui->setupUi(this);

      QFont font = button(QWizard::CommitButton)->font();
      font.setPointSize(50);
      button(QWizard::CommitButton)->setFont(font);

      This isn't going to work.

      Alternatively you can try the same in promoted page's initializePage() method. Doesn't work either.
      BUT changing the font size with setStyleSheet method DOES work!

      Changing other QWizard buttons' font sizes also works.
      It used to work for Commit and Finish buttons in Qt 5.1.1 so it seems a lot like a regression.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              michal.gjk Michal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes