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

[REG] QHeaderView with movable sections and sorting enabled gets confused with the hidden sections

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.0
    • 4.7.0
    • Widgets: Itemviews
    • None
    • 8517f787b798d9e300438404aab359de2acc0978

    Description

      a simple example to reproduce the issue:

      #include <QtGui>
      int main( int argc, char** argv )
      {
       	QApplication app( argc, argv ); 
          QTableView *view = new QTableView;
          QStandardItemModel *model = new QStandardItemModel(4,3);
          for (int i = 0; i< model->rowCount(); ++i)
              for (int j = 0; j< model->columnCount(); ++j)
                  model->setData(model->index(i,j), QString("item [%1,%2]").arg(i).arg(j));
          view->setModel(model);
          view->horizontalHeader()->setMovable(true);
          view->setSortingEnabled(true);
          view->horizontalHeader()->moveSection(0,2);
          view->setColumnHidden(1, true);
          view->show();
      
       	return app.exec();
      }
      

      Attachments

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

        Activity

          People

            ntg Pierre Rossi
            ntg Pierre Rossi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes