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

QComboBox silently invalids the current index, if QStandardItemModel::setItem is called for that index

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.15.0 Alpha
    • 5.12.0
    • Core: Item Models
    • None
    • openSUSE Leap 15.0
    • All
    • 4522b17159a29ffd12c4d93be8a6e8e1a05dccd0 (qt/qtbase/5.15)

      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).

        1. qtbug.zip
          3 kB
        2. where.txt
          7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dfaure_kdab David Faure
            wschenke Winfried Schenke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes