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

Assert failure when a column-spanned item is dragged on QTreeWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 4.8.0, 5.0.0 Beta 1
    • Widgets: Itemviews
    • None
    • Qt4.8.0 + Windows 7

    Description

      The following example demonstrates the error. Run the example and start dragging the 'Spanning' item on the QTreeWidget.
      --> ASSERT failure in QVector<T>::at: "index out of range" is triggered.

      #include <QTreeWidget>
      #include <QApplication>
      
      int main(int argc, char **argv) {
          QApplication app(argc, argv);
      
          QTreeWidget tree;
          tree.setHeaderLabels(QStringList() << "Column 1" << "Column 2");
          tree.setDragDropMode(QAbstractItemView::DragOnly);
          tree.show();
          tree.setFirstItemColumnSpanned(new QTreeWidgetItem(&tree,QStringList() << "Spanning"), true);
      	
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes