Seem like you dont understand my question, i need to get this exemple: http://doc.qt.nokia.com/4.6/xml-rsslisting.html to parse into webView, i ask how?
Seem like you dont understand my question, i need to get this exemple: http://doc.qt.nokia.com/4.6/xml-rsslisting.html to parse into webView, i ask how?
One way would be to take the output from rsslisting and generate a html page, then use webview to view that page.
Can you paste an simple exemple? I don't exactly know how...
Are you sure you know how to program ? I really don't know how to put it simple, but here's your example:
Qt Code:
{ QWebView* webview = new QWebView( this ); webview->setWindowFlags( Qt::Window ); //QDesktopServices::openUrl(QUrl(item->text(1))); }To copy to clipboard, switch view to plain text mode
Now when you double click on item, it will open a QWebView window with the page you are looking for.
No im mean make it like firefox.
Just wrap up the XML data in your custom HTML code, you can do that while parsing the RSS in parseXml(), and using some QString to put all the things togeder, then just grab that QString and show it in QWebView. Just add some check for the description too like:
if (currentTag == "description")
and voala, you have all the data you need, now you have to wrap it up in HTML tags. If you understand how to code HTML it should not be big deal.
Lol you are unbelievable! You have the source code and still you don't know how to display the HTML page that the XML is pointing to? I guess that you even haven't give a little effort to understand how the example works. Anyway here is my hint:
Take a look at the parseXml() method, you will see the line "if (xml.name() == "item")" that is adding items with the URL to the QTreeWidget, just use this URLs to put them in QWebView and make it load them. It is that simple...
Now I see that it is even easier, there is itemActivated(QTreeWidgetItem * item) slot that open the URL in external browser, you can add your code there to open it in QWebView.
Last edited by The Storm; 14th August 2010 at 12:30.
Bookmarks