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

QStyledItemDelegate doesn't take in consideration the Qt::ItemIsUserCheckable flag in initStyleOption

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P5: Not important
    • None
    • 4.8.x, 5.6
    • None

    Description

      In QStyledItemDelegate::initStyleOption a check indicator will be added according to the data stored in the role Qt::CheckStateRole ; more precisely if the this data is valid.

      v4->index = index;
      QVariant value = index.data(Qt::CheckStateRole);
      if (value.isValid() && !value.isNull()) {
          v4->features |= QStyleOptionViewItemV2::HasCheckIndicator;
          v4->checkState = static_cast<Qt::CheckState>(value.toInt());
      }
      

      From my understanding of Qt::ItemIsUserCheckable, this flag should be checked from the model for the given index even before considering polling the data for this index.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jguegant Jean Guegant
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes