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

Behaviour of QStandardItemModel::setItemData() is inconsistent with QAbstractItemModel::setItemData()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.11.0
    • 5.4.1
    • Widgets: Itemviews
    • None
    • 1382374deaa4a854aeb542e6c8f7e1841f2abb10

      The documentation of QStandardItemModel::setItemData() links to the documentation of QAbstractItemModel::setItemData().

      But the behavior of the QStandardItemModel::setItemData() is different. QStandardItemModel::setItemData() removes all roles data which is not set in the QMap parameter of setItemData(). The implementation of QAbstractItemModel::setItemData() changes only the roles and leave all other roles untouched.

      The same behavior was reported at QTBUG-10872 but described for QStandardItem instead of QStandardItemModel, and for an very old version of Qt.

        1. qtbug-45114.zip
          1 kB
          Samuel Gaist
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sgaist Samuel Gaist
            sahadum Thomas Mock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes