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

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.5, 5.12.3
    • Fix Version/s: None
    • Component/s: Widgets: Style Sheets
    • Environment:
      Tested with:
      Qt 5.9.5 LTS on macOS Mojave 10.14.4, on CentOS 7.5.1804 with MATE and on Windows 10
      Qt 5.12.3 LTS on macOS Mojave 10.14.4
    • Platform/s:
      Linux/X11, macOS, Windows

      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
        For Gerrit Dashboard: QTBUG-75846
        # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There is 1 open Gerrit change