Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QVariantMap Question

QVariantMap Question

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 969 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.
  • B Offline
    B Offline
    barrentf
    wrote on last edited by
    #1

    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.

    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