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

    • 8c18a245b (dev), 0c9787bab (6.6), c26e7f278 (6.5)

      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.

        1. 5.12.11.png
          5.12.11.png
          25 kB
        2. 5.13.0.png
          5.13.0.png
          24 kB
        3. untitled.ui
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vhilshei Volker Hilsheimer
            noah Noah Hamerslough
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes