On Thu, Aug 18, 2011 at 2:09 AM, Marco Martin <notm...@gmail.com> wrote:
> > i tought i explained it: a QMap<QString, QString> will never work. > you need to change it to QMap<QString, QVariant>, as easy as that > > That doesn't work either (I had tried it when it was made QVariantMap in the engine). It works if I access in the following manner: Text { text: dataSource.data["PowerDevil"]["Available profiles"]["Performance"] } But not in the case: Component.onCompleted: { var profiles = dataSource.data["PowerDevil"]["Available profiles"]; // do stuff with the map, eg iterate } The latter simply stops at the first line inside the onCompleted saying, dataSource.data["PowerDevil"] [undefined] is not an object, and just wouldn't go any further. The former cannot be used because we wouldn't know names of all the profiles beforehand. Hence we need to iterate over the keys and get the values from the map, which, as I said, is not working even with QVariantMap. Viranch > > -- > Marco Martin >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel