[Interest] QML XmlListModel - How to merge data from two RSS sources
Stanislav Baiduzhyi
baiduzhyi.devel at gmail.com
Thu Apr 9 12:55:29 CEST 2015
On Thursday 09 April 2015 01:26:55 Gianluca wrote:
> Hello,
> I need to collect feed from more than one source and to display using QML.
> I follow the Qt example of the RSS feed done with QML.
> The example use the XmlListModel to collect all information from a RSS feed
> source and then display the feeds using ListView and delegate.
>
> But from what I know, XmlListModel can download only from one source.
> How can I construct a model taking the feeds from two sources and merging
> them sorting by date ?
Hm, that is interesting task. If you'll find the way - post here the solution.
I would suggest you to do one experiment:
1. Create 2 XmlListModel, but do not use them anywhere.
2. Create normal ListModel and use it in your ListView item.
3. Listen for XmlListModel finish loading (through onProgressChange
probably?), and when it loads - copy objects (using get(i)) to the ListModel
(using appent(obj)). If that will work in principle, then you'll be able to
add sorting wherever you want.
--
Regards,
Stas
More information about the Interest
mailing list