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

Qt 5.12: QAbstractItemModel::createIndex method input parameter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.12.0
    • PySide
    • None
    • Windows

    Description

      I use Qt for Python and subclassed QAbstractItemModel to create a model for my treeView. For the data structure I used nodes. Each node has a parent and a childList to represent the data structure.

      When I call the createIndex method I passed as the third argument the node itself, which worked fine. After upgrading from Qt for Python 5.11.2 to 5.12 it gives an error, that it expects other input parameter. Here is the error:
       TypeError: 'PySide2.QtCore.QAbstractItemModel.createIndex' called with wrong argument types:
      PySide2.QtCore.QAbstractItemModel.createIndex(int, int, Node)
      Supported signatures:
      PySide2.QtCore.QAbstractItemModel.createIndex(int, int, quintptr = 0)
      PySide2.QtCore.QAbstractItemModel.createIndex(int, int, void = nullptr)

      Regards
      Daniel

      Attachments

        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
              dagginio Daniel Menne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes