Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.0
-
None
-
openSUSE Leap 15.0
-
-
4522b17159a29ffd12c4d93be8a6e8e1a05dccd0 (qt/qtbase/5.15)
Description
QComboBox silently (i.e. without signal QComboBox::currentIndexChanged) invalidates the current index, if QStandardItemModel::setItem is called for that index of the used model.
The attached "where.txt" shows the function stack. The silent invalidation occurs within "invalidatePersistentIndex" in QStandardItemPrivate::setModel.
The application "app" in the attached "qtbug.zip" reproduces the bug. A click on "Test" in the toolbar changes the current text in the combobox from lower case to upper case or vice versa using QStandardItemModel::setItem. Please look at the output of qDebug. You see the current index before and after "setItem" and the indexes received via signal "currentIndexChanged" (if any).
Attachments
Issue Links
- duplicates
-
QTBUG-13605 QStandardItemModel::setItem makes the QPersistentModelIndexindex of the row Item invalid.
- Closed
For Gerrit Dashboard: QTBUG-73000 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
283993,4 | QStandardItemModel: do not reset persisten index in setItem() | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |