Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Access QObject Item from a QList

$
0
0
You need to cast the pointer to the correct type, recommended ways are: dynamic_cast or (because you have a QObject) qobject_cast [qt-project.org]: Champions* item2 = qobject_cast<Champions*>(datalist.at(2)); if(item2)     item2->name(); Thanks a lot ! It works well for me !

Viewing all articles
Browse latest Browse all 4972

Trending Articles