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

QTableView::setRootindex(const QModelIndex& index) still counts rows of model in vertical header not children of index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.3.1
    • Widgets: Itemviews
    • None

    Description

      When setting a hierarchical QStandardItemModel of the form

      • Item 1
      • Item 1a
      • Item 1b
      • Item 1c
      • Item 2
      • Item 2a
      • Item 2b
      • Item 2c

      to a QTableView and then changing the root e.g. to Item 1 with table->setRootIndex(item1->index()) the QTableView still counts the rows of the first-level-items in the vertical header.

      See attached screenshot that has been created with the attached program contained in the cpp file.
      The QHeaderView attached to the QTableView stops at two when it should count to three (amount of child items)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            simow Simon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes