Hello,

 

I have a requirement where I need to be able to dynamically create a
bunch of objects, and then be able to add them to a list of some sort so
I can scroll through them. Each page can potentially be a different item
with wildly different properties and functionality so coming up with a
single delegate to cover all of these cases is not an option.

 

My thinking was to use a VisualItemModel, dynamically create whatever
Items I require in Javascript code, and then parent these items I create
to the VisualItemModel (with createObject) such that I can then just use
this model as the source for a ListView.

 

I've run into a problem, however. When I call the "createObject"
function on the component, I get the following error message:

 

QDeclarativeComponent: Created graphical object was not placed in the
graphics scene.

 

And the "count" of the VisualItemModel does not increase, and nothing
then shows up in my list. Any idea why I am getting such a message and
how I can achieve what I require?

 

A quick chat with someone in IRC suggested that this may not be possible
with VisualItemModel - but to me it seems like precisely the purpose it
was designed for...

 

Help?

 

Thanks

 

Mark T

_______________________________________________
Qt-qml mailing list
Qt-qml@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to