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. QML and QVariant(QObjectList)
Forum Updated to NodeBB v4.3 + New Features

QML and QVariant(QObjectList)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 525 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.
  • R Offline
    R Offline
    Roman H.
    wrote on last edited by
    #1

    Hello,

    while porting a QtDeclartive application to QtQuick I came to a point where a data model is exposing a list
    of QObjects from the data() member function to QML.

    it seems that the behaviour changed here a little bit. Before, Qt exposed to QML a QObjectList type, but now it exposes a QVariant(QObjectList) .

    I have not found a way to access the QObjectList inside the QVariant. Is there any way?

    accessing it via [] operator returns 'undefined'.

    Trying to get the 'value' e.g. QObjectList by calling .value()
    TypeError: Property 'value' of object QVariant(QObjectList) is not a function'

    Any Solution that does not involve rewriting the model?

    Regards

    Roman

    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