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

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

      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

       

        1. qcombobox_qstackwidget_macos.tar.gz
          1 kB
          François Bertel
        2. win10_tab.png
          8 kB
          François Bertel
        3. mate_tab.png
          11 kB
          François Bertel
        4. win10_workaround_tab.png
          8 kB
          François Bertel
        5. win10_stack.png
          9 kB
          François Bertel
        6. win10_workaround_stack.png
          10 kB
          François Bertel
        7. win10_normal.png
          8 kB
          François Bertel
        8. win10_workaround_normal.png
          8 kB
          François Bertel
        9. mate_stack.png
          11 kB
          François Bertel
        10. mate_normal.png
          10 kB
          François Bertel
        11. macos_tab.png
          25 kB
          François Bertel
        12. macos_workaround_tab.png
          24 kB
          François Bertel
        13. macos_stack.png
          25 kB
          François Bertel
        14. macos_workaround_stack.png
          24 kB
          François Bertel
        15. macos_normal.png
          24 kB
          François Bertel
        16. macos_workaround_normal.png
          24 kB
          François Bertel
        17. qtbug75846_log.txt
          226 kB
          Friedemann Kleint
        18. qtbug75846_diag.diff
          21 kB
          Friedemann Kleint
        19. qtbug75846.zip
          2 kB
          Friedemann Kleint
        20. image.png
          24 kB
          Volker Hilsheimer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes