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

API 2 QVariant Issue

    XMLWordPrintable

Details

    • b5a574eaeeb6a4f30794e6012b96f05a3de49217

    Description

      When objects are returned from QModelIndex.data they are not an instance of the object return from QAbstractItemModel.data.

      I have setup a QAbstractItemModel subclass the returns a custom modelObject when given the custom userRole. This works just fine when I call mode.data(index,role). When I call index.data(role) I do not get an object of the correct type returned. It seems to return the python base type even if it is a super class way up in the inheritance. This happens with QAbstractProxyModel as well. I think any time it goes to Qt wraped data method it looses its python type information.

      Attachments

        1. example.py
          1 kB
          Matthew Chapman
        2. pyside-82-example.py
          1 kB
          Christian Tismer

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              mattchap Matthew Chapman
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes