Reply
Thread Tools
Posts: 5 | Thanked: 0 times | Joined on Jan 2010 @ Madrid - Spain
#1
Hi all !!.

I would like to ask for some help, or at least a few pointers about an application that i’m currently developing with QT for the N900. This is my first time developing on this platform.

My goal is to create an application or widget that will display a list of news articles, followed by images and a short text. When I click on one of those articles, it will be displayed in detail, with all its content and its image gallery.

The data is given by an XML through the QXmlStreamReader class, and then I sabe them on a QtreWidget so I can browse through them with QTreeWidgetItemIterator. Up to this point, everything seems fine.

The problem starts when the whole content must be displayed. The appearance should be similar to a website, but i’m not sure what would be the best way to convert and display the information read from the XML in visual objects, i.e., grab the image urls and display them on the app. I have read the documentation regarding the layouts (QGridLayout, QHBoxLayout,...), but I am not sure if this would be the best way to do what i’m trying to do, and I also don’t see the way to “connect” the action of clicking on the article with the access to the detailed piece of news. Could you help me out with this?


I have tried creating the site and loading it with the QWebView class, but I don’t think this would be the best way to do what I’m intending to do.


I would really appreciate it if you could help me out.

Thanks in advance and kind regards.
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#2
Originally Posted by ltramon View Post
I have tried creating the site and loading it with the QWebView class, but I don’t think this would be the best way to do what I’m intending to do.
if it's only about displaying XML data in a proper format, maybe some sort of xslt transformation would be simplest.

you'd have to write the xslt in a way that your XML data gets transformed into simple HTML, which you could then display in QWebView.

my 2c
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 

The Following 2 Users Say Thank You to SubCore For This Useful Post:
Posts: 5 | Thanked: 0 times | Joined on Jan 2010 @ Madrid - Spain
#3
Thanks a lot, SubCore.

I'm going to do it with a xslt.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:24.