QVariantMap Question



  • I'm developing natively on the blackberry 10 in c++, I've turned an XML file into the following QVariantMap:

    @
    QMap(
    ("_MoreStuff", QVariant
    (QVariantList,
    (QVariant
    (QVariantMap, QMap
    (("stuffID", QVariant(QString, "1") )
    ( "stuffValue" , QVariant(QString, "I want this value 1") ) )
    ) ,
    QVariant
    (QVariantMap, QMap
    (("stuffID", QVariant(QString, "2") )
    ( "stuffValue" , QVariant(QString, "I want this value 2") ) )
    ) ,
    QVariant(
    QVariantMap, QMap
    (("stuffID", QVariant(QString, "3") )
    ( "stuffValue" , QVariant(QString, "I want this value 3") ) )
    ) ...
    @

    I want to search for stuffID of value 2 for instance and get the associated stuffValue of "I want this value 2"
    Anyone know how to do this, or point me in the direction of helpful documentation?

    I'm having trouble just pulling the Qmap apart, like
    QList<QVariant> languagelist = datamap.value("_MoreStuff").toList(); is just giving me errors.


Log in to reply
 

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