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

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

    XMLWordPrintable

Details

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

    Description

      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;
          }
      };
      
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes