QMap in QML

Viranch Mehta viranch.mehta at gmail.com
Sat Jun 4 11:28:10 CEST 2011


On Sat, Jun 4, 2011 at 1:19 PM, Marco Martin <notmart at gmail.com> wrote:

>
> try to do
> for (item in map) {
>     print(item)
>     print(map[item])
> }
>
>
>
Well actually, i'm getting the data
( dataSource.data["PowerDevil"]["Available profiles"] ) inside
Component.onCompleted and then running the for loop on it. But the execution
stops saying:
TypeError: Result of expression 'dataSource.data["PowerDevil"]' [undefined]
is not an object.

So it never goes into the for loop (I checked this by putting normal prints
in the for loop). The above error occurs at all places in the plasmoid
wherever I call the engine, but still gives the data. Here, it doesn't.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110604/57e9d963/attachment.htm 


More information about the Plasma-devel mailing list