XML List Model can help with non-XML APIs?
-
wrote on 10 Mar 2011, 10:42 last edited by
Hi,
I (probably) have a problem. I am using with satisfaction XmlListModel features in the project "RC Hobby Stream":https://projects.forum.nokia.com/rchobbystream using the Twitter api to access to some informations on users and tweets. Twitter releases standard API that return after every call a well-formed XML file
In the project "Naijanimi Free SMS":https://projects.forum.nokia.com/naijanimi I have to access Internet API too, with the difference that these returns text strings and not XML. XmlListModel features can also be adapted to a case of this kind?
-
wrote on 10 Mar 2011, 10:48 last edited by
No. XmlListModel works on XML. If you need to support other types of feeds, you may need to create your own QAbstractListModel based model and use that from your QML.
-
wrote on 10 Mar 2011, 10:51 last edited by
Andre, you are great! When I post some kind of questions, I think "hope Andre read this..." :)
Well, I was supposing. Do you know if there are some good examples ? Thanks
-
wrote on 10 Mar 2011, 11:00 last edited by
No, sorry. I don't know any examples for that. However, Qt supplies all the components you need to build such an interface. QNetworkAccessManager can be used to access your webservice and QAbstractListModel can be used as a basis to build your model on. It all depends on the way your webservice actually works how to do the implementation of this, of course.
-
wrote on 10 Mar 2011, 11:06 last edited by
Thank you for this suggestion, very useful for orientation. If you like to know how I implement this solution asap you can follow the mentioned project.
What I am doing at this moment is the creation of the wiki pages describing the api and related answer format.
4/5