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

QComboBox extra inter-item spacing in list when style sheet decreases font size on all but the first page of QTabWidget / depends on order of parenting the tabwidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.6.3, 4.7.0
    • Widgets: Style Sheets
    • None
    • The bug can be reproduced on all platforms (X11/OS X/Win32).

    Description

      When a QSS style sheet for the application contains
      QWidget

      { font-size: 10px; }

      and QComboBoxes exist on a page of a QTabWidget
      and that page has index > 0
      and the QTabWidget receives its parent through the QLayout (as opposed to having its parent given as a ctor argument)
      then the combobox list items are wrongly spaced, throwing the height calculation of the list off, leading to the need to scroll when the items should well fit on screen.

      Attached demo project demonstrates this with a dialog that is instantiated in two ways:
      1. if 'bug' == true, passes 0 to the QTabWidget ctor, letting the layout set its parent indirectly
      2. if 'bug' == false, passes this to the QTabWidget ctor directly

      (Jira only allows three attached files per round-trip, so I will attach two more files after creating the issue)

      Attachments

        1. dialog.cpp
          0.6 kB
          Marc Mutz
        2. dialog.h
          0.3 kB
          Marc Mutz
        3. main.cpp
          0.3 kB
          Marc Mutz
        4. page.ui
          2 kB
          Marc Mutz
        5. qss-fs.pro
          0.1 kB
          Marc Mutz
        6. qtbug-14127-buggy.png
          6 kB
          Marc Mutz
        7. qtbug-14128-not-buggy.png
          6 kB
          Marc Mutz
        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
            mmutz Marc Mutz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes