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

QColumnView - setEditTriggers(QAbstractItemView::NoEditTriggers) has no effect on the first column items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.6.0, 4.6.3, 4.7.0
    • Widgets: Itemviews
    • None

      When executing setEditTriggers(QAbstractItemView::NoEditTriggers) for a QColumnView the items in the first (leftmost) column remains editable. The items in the other columns become read only as expected.

      Include a test case to reproduce

      A workaround for this issue is to use MyColumnView instead:

      class MyColumnView : public QColumnView
      {
      protected:
          QAbstractItemView *createColumn ( const QModelIndex & index )
          {
              QAbstractItemView *v = QColumnView::createColumn(index);
              v->setEditTriggers(QAbstractItemView::NoEditTriggers);
              return v;
          }
      };
      
      

        1. main.cpp
          0.7 kB
          Nokia Qt Support
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes