01-04-2013 11:08 AM
I have two pages main.qml and score.qml and I want to display data by groupdata model using listview in score.qml. The problem is as score.qml is not direct child of navigationpane,it is not able to locate the object of groupdatamodel and can't bind it. How can I display data into that in such case?
Solved! Go to Solution.
01-04-2013 01:19 PM
score.qml doesn't have to be a direct child - but it must be part of the navigation hierarchy otherwise findChild will not work.
Try setting the parent of score.qml to the navigationpane (when using createObject)
Otherwise you have two options:
1. You have created score.qml, so you must have its document root somewhere - use *that* to do a findChild()
2. Pass the QObject* of the model into C++ and access it that way
01-04-2013 01:43 PM
Can you please explain the 2nd point. How to achieve it? I have also tried using attachedobject to the main.qml but it doesnt work
01-04-2013 10:06 PM