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

QTabWidget tab titles don't inherit QApplication font size

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.1
    • None
    • MacOS X 10.11.6, MacBook Pro Retina
    • macOS

    Description

      On MacOS X 10.11, the following code:

       

       

      #include <QApplication>
      #include <QTabWidget>
      #include <QLabel>
      #include <QMainWindow>
      #include <QFont>
      
      int main(int argc, char *argv[]) {
      
      QApplication app(argc, argv);
      
      QMainWindow *window = new QMainWindow;
      
      QFont font = app.font();
      font.setPointSize(6);
      app.setFont(font);
      
      QLabel *label = new QLabel;
      label->setText("This is a text label");
      
      QTabWidget *tabs = new QTabWidget;
      tabs->addTab(label, "This is a tab");
      
      window->setCentralWidget(tabs);
      
      window->show();
      window->raise();
      return app.exec();
      }
      

       

      results in the attached screenshot. The issue is that while the QLabel correctly inherits the QApplication font size, the title of the tab does not.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            trobitaille trobitaille
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes