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

QTableView and QTreeView with Fixed vertical size policy and AdjustToContents sizeAdjustPolicy always reserve space for horizontal scroll bar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.13.0, 6.3.2
    • Widgets: Itemviews
    • None

    Description

      I suspect this is a regression from https://bugreports.qt.io/browse/QTBUG-69120

      The UI file contains a QTableView and a QTreeview with a vertical size policy of Fixed and a sizeAdjustPolicy of AdjustToContents. In 5.12.11 this would result in a perfectly sized table to embed in a larger scroll area. Starting with 5.13.0 it began to always reserve space for the horizontal scroll bar, even when it is not shown.

      The only workaround I've found is to set the horizontalScrollBarPolicy to ScrollBarAlwaysOff, but this is not appropriate in all cases.

      Attachments

        1. untitled.ui
          3 kB
        2. 5.12.11.png
          5.12.11.png
          25 kB
        3. 5.13.0.png
          5.13.0.png
          24 kB

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            noah Noah Hamerslough
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: