×
Namespaces

Variants
Actions

Archived:How to use QWebView

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Qt Quick should be used for all UI development on mobile devices. The approach described in this article (based on QWidget) is deprecated.

This article shows how to load a URL in a QWebView. This class provides a widget that is used to view and edit web documents.

Article Metadata
Tested with
Devices(s): S60 Emulator
Compatibility
Platform(s): S60 3rd Edition FP1, S60 3rd Edition FP2, S60 5th Edition
Symbian
Article
Keywords: QWebView
Created: mind_freak (11 Mar 2009)
Last edited: hamishwillee (11 Oct 2012)

Contents

Various Function

  • This is used to load the specific URL(uniform resource locator)
web->load(QUrl("http://www.google.com.au/.au/.au/.au/.au/"));

.pro file

QT += webkit

Source Code

#include <QApplication>
#include <QWebView>
#include <QUrl>
 
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
 
QWebView view;
view.setStyleSheet("background-color:rgb(150,147,88); padding: 7px ; color:rgb(255,255,255)");
view.load(QUrl("http://www.google.com.au/.au/.au/.au/.au/"));
view.showMaximized();
 
return a.exec();
}

Screenshot

Web001.jpg

.

This page was last modified on 11 October 2012, at 04:14.
109 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×