QML and QVariant(QObjectList)



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.