Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Qt 5.12: QAbstractItemModel::createIndex method input parameter
Forum Updated to NodeBB v4.3 + New Features

Qt 5.12: QAbstractItemModel::createIndex method input parameter

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dagginio
    wrote on last edited by
    #1

    Hello,
    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)
    

    Can someone explain this?
    Thanks
    Daniel

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      PySide2 being pretty new, I would recommend asking this question on the dedicated mailing list. You'll find there PySide2's developers/maintainers. This forum is more user oriented.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dagginio
        wrote on last edited by
        #3

        Thanks for your answer. I wrote an email as you suggested...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Please, don't forget to update this thread with the result or post a link to the email conversation.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved