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

QComboBox with non-default font size and inside a QStackedWidget or QTabWidgets is rendered incorrectly

    XMLWordPrintable

Details

    • Linux/X11, macOS, Windows
    • 75285b64ada65748f1fee3942a95b46a3f0b9d7e (qt/qtbase/5.14)

    Description

      If the font size for QComboxBox objects is set to a specific value on the QApplication stylesheet, the QComboBox objects which are children of QStackedWidget or QTabWidgets are not sized properly. This is more obvious on Mac than on Linux or Windows but it happens on all desktop platforms. This is not an issue for QComboBox object which are direct children of the main QWidget.

      The workaround is to call app.setStyleSheet(app.styleSheet()) after the window is shown.

      Please the attached archive project (qcombobox_qstackwidget_macos.tar.gz) , where the workaround is commented out in main.cxx .

       

       

      OS Tab Tab with workaround Stack Stack with workaround Normal Normal with workaround
      macOS
      Linux      
      Windows

       

      Attachments

        1. image.png
          24 kB
          Volker Hilsheimer
        2. macos_normal.png
          24 kB
          François Bertel
        3. macos_stack.png
          25 kB
          François Bertel
        4. macos_tab.png
          25 kB
          François Bertel
        5. macos_workaround_normal.png
          24 kB
          François Bertel
        6. macos_workaround_stack.png
          24 kB
          François Bertel
        7. macos_workaround_tab.png
          24 kB
          François Bertel
        8. mate_normal.png
          10 kB
          François Bertel
        9. mate_stack.png
          11 kB
          François Bertel
        10. mate_tab.png
          11 kB
          François Bertel
        11. qcombobox_qstackwidget_macos.tar.gz
          1 kB
          François Bertel
        12. qtbug75846_diag.diff
          21 kB
          Friedemann Kleint
        13. qtbug75846_log.txt
          226 kB
          Friedemann Kleint
        14. qtbug75846.zip
          2 kB
          Friedemann Kleint
        15. win10_normal.png
          8 kB
          François Bertel
        16. win10_stack.png
          9 kB
          François Bertel
        17. win10_tab.png
          8 kB
          François Bertel
        18. win10_workaround_normal.png
          8 kB
          François Bertel
        19. win10_workaround_stack.png
          10 kB
          François Bertel
        20. win10_workaround_tab.png
          8 kB
          François Bertel

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            fbertelschrodinger François Bertel
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: