Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-723

Error with QObject model data in subclass of subclass of QAbstractListModel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.0, 5.12.4
    • PySide
    • None

    Description

      I'm trying to write a more generic subclass of QAbstractListModel which only needs the roles and the data as a list.

      This works fine if I'm using dict as model data. But using a QObject as model data somehow breaks QML.

      Please see the attached example. It fails with the error:

      QQmlExpression: Expression file:///...bug.qml:17:23 depends on non-NOTIFYable properties:
      QQmlDMObjectData::name

      The exact same code without an additional subclass (`ConcreteModelWorking`) works.

      Attachments

        1. bug.py
          2 kB
        2. bug.qml
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            schlamar schlamar
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes