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
          image.png
          24 kB
        2. macos_normal.png
          macos_normal.png
          24 kB
        3. macos_stack.png
          macos_stack.png
          25 kB
        4. macos_tab.png
          macos_tab.png
          25 kB
        5. macos_workaround_normal.png
          macos_workaround_normal.png
          24 kB
        6. macos_workaround_stack.png
          macos_workaround_stack.png
          24 kB
        7. macos_workaround_tab.png
          macos_workaround_tab.png
          24 kB
        8. mate_normal.png
          mate_normal.png
          10 kB
        9. mate_stack.png
          mate_stack.png
          11 kB
        10. mate_tab.png
          mate_tab.png
          11 kB
        11. qcombobox_qstackwidget_macos.tar.gz
          1 kB
        12. qtbug75846_diag.diff
          21 kB
        13. qtbug75846_log.txt
          226 kB
        14. qtbug75846.zip
          2 kB
        15. win10_normal.png
          win10_normal.png
          8 kB
        16. win10_stack.png
          win10_stack.png
          9 kB
        17. win10_tab.png
          win10_tab.png
          8 kB
        18. win10_workaround_normal.png
          win10_workaround_normal.png
          8 kB
        19. win10_workaround_stack.png
          win10_workaround_stack.png
          10 kB
        20. win10_workaround_tab.png
          win10_workaround_tab.png
          8 kB
        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
            fbertelschrodinger François Bertel
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes