Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Pyside6 to QML QAbstractTableModel Data Method, returning a dictionary to var type

Pyside6 to QML QAbstractTableModel Data Method, returning a dictionary to var type

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 98 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.
  • L Offline
    L Offline
    Leooooooooo
    wrote last edited by
    #1

    I'm using python pyside6 QAbstractTableModel to a QML TableView, but I have an issue where in the table model data() method it returns a python dictionary for example {"type": "string"} and in the TableView delegate I have model.control.type but I get an error saying its "undefined". It seems if I return a string instead of a python dictionary it works but I know qml can recieve python dictionaries as I've done so before with QObject properties

    Any idea if the data() method is just incapable of retuning a var?

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

      Hi and welcome to devnet,

      Can you share a minimal runnable script that shows this ?
      Also, which version of PySide6 are you using ?
      With which version of Python ?

      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