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

QTableView doesn't display horizontal scrollBar for 1-column QAbstractTableModel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.8.2
    • Widgets: Itemviews
    • None
    • Ubuntu, x64.

      Take an QAbstractTableModel with columnCount() == 1.
      Set it on a QTableView.

      When resizing the column's width to make it larger that the QTableView width, the expected horizontal scrollBar does not appear.
      Change your QAbstractTableModel to have a columnCount() == 2, the scrollbar appears, everything is fine.

      (See attached code.)

        1. main.cpp
          0.8 kB
          Christophe Daudin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            christophe.daudin Christophe Daudin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes