maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   My first steps with Qt (https://talk.maemo.org/showthread.php?t=40206)

ltramon 2010-01-12 14:26

My first steps with Qt
 
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 2010-01-12 14:42

Re: My first steps with Qt
 
Quote:

Originally Posted by ltramon (Post 466366)
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 :)

ltramon 2010-01-13 07:56

Re: My first steps with Qt
 
Thanks a lot, SubCore.

I'm going to do it with a xslt.


All times are GMT. The time now is 00:19.

vBulletin® Version 3.8.8