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. Access members of `QVariant(PySide::PyObjectWrapper)` on QML
Forum Updated to NodeBB v4.3 + New Features

Access members of `QVariant(PySide::PyObjectWrapper)` on QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 483 Views
  • 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
    Developer123
    wrote on last edited by
    #1

    In my backend (python, PySide2), I have a signal of type:

    sendData = Signal(object)
    

    which sends a python dictionary such as:

    data = {'1': 123,
            '2': 456,
            '3': 789}
    

    Using the function call:

    self.sendData.emit(data)
    

    On the "frontend", I have QML on QtQuick, which when I print the received data, I get:

    qml: QVariant(PySide::PyObjectWrapper, )

    How can I access e.g. data['1'], to get 123 ?

    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