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

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

    XMLWordPrintable

Details

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

    Description

      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.)

      Attachments

        1. main.cpp
          0.8 kB
          Christophe Daudin

        Issue Links

          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
              christophe.daudin Christophe Daudin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes