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

Spans in QTableView get confused when visual indices are different from the logical indices.

    XMLWordPrintable

Details

    Description

      In the following example, "Item 1,0" is visible and selectable, and should not, and "Item 2,1" is not and should be.

      #include <QtGui/QtGui>
      
      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);
      
      QTableWidget table(8,4);
      for (int i=0; i < table.rowCount(); i++) {
          for (int j=0; j < table.columnCount(); j++)
              table.setItem(i, j, new QTableWidgetItem(QString("item %1,%2").arg(i).arg(j)));
      }
      
      table.horizontalHeader()->swapSections(1,0);
      table.setSpan(1, 1, 1, table.columnCount());
      table.setSpan(2, 0, 1, table.columnCount());
      
      table.show();
      return app.exec();
      } 
      
      

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            ntg Pierre Rossi
            Votes:
            8 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes