How can I fill ListElement using data from DB
Hi,
How can I fill ListElement using data from DB.
I cant use Repeater Element inside ListElement/ListModel I get this:
[CODE]ListElement: cannot contain nested elements
Repeater{ [/CODE]
I cant use javascript because qml inside JS like this:
[CODE]ListElement {name: item.name; count: item.count }[/CODE]
doesn't work.
App:
[URL="https://dl.dropbox.com/u/6412001/Andjsapp_.zip"]https://dl.dropbox.com/u/6412001/Andjsapp_.zip[/URL]
Re: How can I fill ListElement using data from DB
Your db implementation is in c++ class, if yes then following articles can help you out to a certain extent:
[url]http://cdumez.blogspot.in/2010/11/how-to-use-c-list-model-in-qml.html[/url]
[url]http://www.developer.nokia.com/Community/Wiki/Dynamically_creating/updating_listbox_in_QML_from_C%2B%2B(though[/url] it involves xml parsing & exposing that data to QML listmodel, but you can replace that xml part with your db & expose that db data to a list model)