source: trunk/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc@ 561

Last change on this file since 561 was 561, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:eol-style set to native
File size: 7.7 KB
Line 
1/*!
2 \module QtWebKit
3 \title QtWebKit Module
4 \contentspage All Qt Modules
5 \previouspage QtSvg
6 \nextpage QtXml
7 \ingroup modules
8 \brief The QtWebKit module provides a web browser engine as well as
9 classes to render and interact with web content.
10
11 To include the definitions of the module's classes, use the
12 following directive:
13
14 \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 1
15
16 To link against the module, add this line to your \l qmake \c
17 .pro file:
18
19 \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0
20
21 \section1 License Information
22
23 This is a snapshot of the Qt port of WebKit. The exact version information
24 can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt.
25
26 Qt Commercial Edition licensees that wish to distribute applications that
27 use the QtWebKit module need to be aware of their obligations under the
28 GNU Library General Public License (LGPL).
29
30 Developers using the Open Source Edition can choose to redistribute
31 the module under the appropriate version of the GNU LGPL.
32
33 \legalese
34 WebKit is licensed under the GNU Library General Public License.
35 Individual contributor names and copyright dates can be found
36 inline in the code.
37
38 This library is free software; you can redistribute it and/or
39 modify it under the terms of the GNU Library General Public
40 License as published by the Free Software Foundation; either
41 version 2 of the License, or (at your option) any later version.
42
43 This library is distributed in the hope that it will be useful,
44 but WITHOUT ANY WARRANTY; without even the implied warranty of
45 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
46 Library General Public License for more details.
47
48 You should have received a copy of the GNU Library General Public License
49 along with this library; see the file COPYING.LIB. If not, write to
50 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
51 Boston, MA 02110-1301, USA.
52 \endlegalese
53*/
54
55/*!
56 \page webintegration.html
57 \title Integrating Web Content with QtWebKit
58 \since 4.4
59
60 \ingroup frameworks-technologies
61
62 \keyword Browser
63 \keyword Web Browser
64
65 QtWebKit provides a Web browser engine that makes it easy to embed content
66 from the World Wide Web into your Qt application. At the same time Web
67 content can be enhanced with native controls.
68
69 QtWebKit provides facilities for rendering of HyperText Markup Language
70 (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector
71 Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and
72 scripted with JavaScript.
73
74 A bridge between the JavaScript execution environment and the Qt object
75 model makes it possible for custom QObjects to be scripted. Integration
76 with the Qt networking module enables Web pages to be transparently loaded
77 from Web servers, the local file system or even the Qt resource system.
78
79 In addition to providing pure rendering features, HTML documents can be
80 made fully editable to the user through the use of the \c{contenteditable}
81 attribute on HTML elements.
82
83 QtWebKit is based on the Open Source WebKit engine. More information about
84 WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
85
86 The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the
87 \l{Open Source Versions of Qt}.
88
89 \note Building the QtWebKit module with debugging symbols is problematic
90 on many platforms due to the size of the WebKit engine. We recommend
91 building the module only in release mode for embedded platforms.
92 Currently QtWebKit will always be compiled without debugging symbols
93 when using gcc. Take a look at the last lines of
94 \c{src/3rdparty/webkit/WebCore/WebCore.pro} if you need to change this.
95
96 \note Web site icons, also known as "FavIcons", are currently not supported
97 on Windows. We plan to address this in a future release.
98
99 \note WebKit has certain minimum requirements that must be met on
100 Embedded Linux systems. See the \l{Qt for Embedded Linux Requirements}
101 document for more information.
102
103 Topics:
104
105 \tableofcontents
106
107 \section1 Architecture
108
109 The easiest way to render content is through the QWebView class. As a
110 widget it can be embedded into your forms or a graphics view, and it
111 provides convenience functions for downloading and rendering web sites.
112
113 \snippet webkitsnippets/simple/main.cpp Using QWebView
114
115 QWebView is used to view Web pages. An instance of QWebView has one
116 QWebPage. QWebPage provides access to the document structure in a page,
117 describing features such as frames, the navigation history, and the
118 undo/redo stack for editable content.
119
120 HTML documents can be nested using frames in a frameset. An individual
121 frame in HTML is represented using the QWebFrame class. This class includes the
122 bridge to the JavaScript window object and can be painted using QPainter.
123 Each QWebPage has one QWebFrame object as its main frame, and the main frame
124 may contain many child frames.
125
126 Individual elements of an HTML document can be accessed via DOM JavaScript
127 interfaces from within a web page. The equivalent of this API in QtWebKit
128 is represented by QWebElement. QWebElement objects are obtained using QWebFrame's
129 \l{QWebFrame::}{findAllElements()} and \l{QWebFrame::}{findFirstElement()}
130 functions with CSS selector queries.
131
132 Common web browser features, defaults and other settings can be configured
133 through the QWebSettings class. It is possible to provide defaults for all
134 QWebPage instances through the default settings. Individual attributes
135 can be overidden by the page specific settings object.
136
137 \section1 Netscape Plugin Support
138
139 \note Netscape plugin support is only available on desktop platforms.
140
141 Since WebKit supports the Netscape Plugin API, Qt applications can display
142 Web pages that embed common plugins on platforms for which those plugins
143 are available. To enable plugin support, the user must have the appropriate
144 binary files for those plugins installed and the \l{QWebSettings::PluginsEnabled}
145 attribute must be enabled for the application.
146
147 The following locations are searched for plugins:
148
149 \table
150 \header \o Linux/Unix (X11) \o Windows
151 \row \o{1,3}
152 \list
153 \o \c{.mozilla/plugins} in the user's home directory
154 \o \c{.netscape/plugins} in the user's home directory
155 \o System locations, such as
156 \list
157 \o \c{/usr/lib/browser/plugins}
158 \o \c{/usr/local/lib/mozilla/plugins}
159 \o \c{/usr/lib/firefox/plugins}
160 \o \c{/usr/lib64/browser-plugins}
161 \o \c{/usr/lib/browser-plugins}
162 \o \c{/usr/lib/mozilla/plugins}
163 \o \c{/usr/local/netscape/plugins}
164 \o \c{/opt/mozilla/plugins}
165 \o \c{/opt/mozilla/lib/plugins}
166 \o \c{/opt/netscape/plugins}
167 \o \c{/opt/netscape/communicator/plugins}
168 \o \c{/usr/lib/netscape/plugins}
169 \o \c{/usr/lib/netscape/plugins-libc5}
170 \o \c{/usr/lib/netscape/plugins-libc6}
171 \o \c{/usr/lib64/netscape/plugins}
172 \o \c{/usr/lib64/mozilla/plugins}
173 \endlist
174 \o Locations specified by environment variables:
175 \list
176 \o \c{$MOZILLA_HOME/plugins}
177 \o \c{$MOZ_PLUGIN_PATH}
178 \o \c{$QTWEBKIT_PLUGIN_PATH}
179 \endlist
180 \endlist
181
182 \o
183 \list
184 \o The user's \c{Application Data\Mozilla\plugins} directory
185 \o Standard system locations of plugins for Quicktime, Flash, etc.
186 \endlist
187
188 \row
189 \raw HTML
190 <th class="qt-style">Mac OS X</th>
191 \endraw
192 \row
193 \o
194 \list
195 \o \c{Library/Internet Plug-Ins} in the user's home directory
196 \o The system \c{/Library/Internet Plug-Ins} directory
197 \endlist
198 \endtable
199*/
Note: See TracBrowser for help on using the repository browser.