Archived:How to use QWebView
Archived: 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.
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
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 += webkitSource 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
.



12 Sep
2009
24 Sep
2009