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

signal dataChanged does not update the QML ListView

    XMLWordPrintable

Details

    • f6bfc5bcbed84a71b22fb04b56ae6eb294e4914d

    Description

      Example is in attachment

      1) program a QAbstractListModel with a slot or Q_INVOKABLE that changes it's data and emits a dataChanged similar to this:

      void Model::changeData()
      {
      m_elements[1] ="x";
      emit dataChanged(index(1,0), index(1,0));
      }

      2) extend the QAbstracListModel as a useable model in QML as is done in the example

      3) hook up the model to the listview and the slot to a key press.

      ===>The slot gets called, the method QAbstracListModel::data() gets called, but the listview does not get updated

      Notes: a model reset() will update the listview.

      Attachments

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            christo Christopher Probst
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: