flyonok

统计

留言簿(7)

ACE

book

boost

bsd

c study

c++

code download

codeblock

computer clound

Eclipse

embed system

erlang

ET++

gtk

ic card

java

KDE

libevent

linux

linux--MM

mysql

network education

one card

oracle

pcap relation

php

powerbuilder

python

QT

software config

software test

SQL server

UML

wireless

wxwidgets

陈宾

阅读排行榜

评论排行榜

How to use QWebView in Qt for Symbian


How to use QWebView in Qt for Symbian

From Forum Nokia Wiki

Reviewer Approved   



ID ... Creation date 11 March 2009
Platform S60 3rd Edition FP1, S60 3rd Edition FP2, S60 5th Edition Tested on devices S60 Emulator
Category Qt Subcategory Application


Keywords (APIs, classes, methods, functions): QWebView


Overview

The QWebView class provides a widget that is used to view and edit web documents.

QWebView is the main widget component of the QtWebKit web browsing module. It can be used in various applications to display web content live from the Internet.

This example makes the use of following classes:

QWebView-Provides a widget that is used to view and edit web documents


Preconditions

Various Function

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

Source Code

#include <QtGui/QApplication>
#include "webdialog.h"
#include<QWidget>
#include<QWebView>
#include<QVBoxLayout>
#include<QUrl>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget *win=new QWidget();
QVBoxLayout *lay=new QVBoxLayout();
QWebView *web=new QWebView();
web->load(QUrl("http://www.google.com"));
web->show();
lay->addWidget(web);
win->setLayout(lay);
win->showMaximized();
win->setStyleSheet("* { background-color:#969358; padding: 7px ; color:#ffffff}");
 
return a.exec();
}


Screenshot

Image:Web001.jpg

For more Details in QWebView.

posted on 2010-04-09 14:37 flyonok 阅读(689) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理