Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1272

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QWebPage Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QWebPage Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QWebPage class provides an object to view and edit web
documents. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Types</h3><ul><li><div class="fn" />class <b><a href="qwebpage-choosemultiplefilesextensionoption.html">ChooseMultipleFilesExtensionOption</a></b></li><li><div class="fn" />class <b><a href="qwebpage-choosemultiplefilesextensionreturn.html">ChooseMultipleFilesExtensionReturn</a></b></li><li><div class="fn" />enum <b><a href="qwebpage.html#ErrorDomain-enum">ErrorDomain</a></b> { QtNetwork, Http, WebKit }</li><li><div class="fn" />class <b><a href="qwebpage-errorpageextensionoption.html">ErrorPageExtensionOption</a></b></li><li><div class="fn" />class <b><a href="qwebpage-errorpageextensionreturn.html">ErrorPageExtensionReturn</a></b></li><li><div class="fn" />enum <b><a href="qwebpage.html#Extension-enum">Extension</a></b> { ChooseMultipleFilesExtension, ErrorPageExtension }</li><li><div class="fn" />class <b><a href="qwebpage-extensionoption.html">ExtensionOption</a></b></li><li><div class="fn" />class <b><a href="qwebpage-extensionreturn.html">ExtensionReturn</a></b></li><li><div class="fn" />enum <b><a href="qwebpage.html#Feature-enum">Feature</a></b> { Notifications, Geolocation }</li><li><div class="fn" />enum <b><a href="qwebpage.html#FindFlag-enum">FindFlag</a></b> { FindBackward, FindCaseSensitively, FindWrapsAroundDocument, HighlightAllOccurrences }</li><li><div class="fn" />class <b><a href="qwebpage-findflags.html">FindFlags</a></b></li><li><div class="fn" />enum <b><a href="qwebpage.html#LinkDelegationPolicy-enum">LinkDelegationPolicy</a></b> { DontDelegateLinks, DelegateExternalLinks, DelegateAllLinks }</li><li><div class="fn" />enum <b><a href="qwebpage.html#NavigationType-enum">NavigationType</a></b> { NavigationTypeLinkClicked, NavigationTypeFormSubmitted, NavigationTypeBackOrForward, NavigationTypeReload, NavigationTypeFormResubmitted, NavigationTypeOther }</li><li><div class="fn" />enum <b><a href="qwebpage.html#PermissionPolicy-enum">PermissionPolicy</a></b> { PermissionUnknown, PermissionGrantedByUser, PermissionDeniedByUser }</li><li><div class="fn" />class <b><a href="qwebpage-viewportattributes.html">ViewportAttributes</a></b></li><li><div class="fn" />enum <b><a href="qwebpage.html#WebAction-enum">WebAction</a></b> { NoWebAction, OpenLink, OpenLinkInNewWindow, OpenFrameInNewWindow, ..., CopyImageUrlToClipboard }</li><li><div class="fn" />enum <b><a href="qwebpage.html#WebWindowType-enum">WebWindowType</a></b> { WebBrowserWindow, WebModalDialog }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwebpage.html#QWebPage">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qwebpage.html#acceptNavigationRequest">acceptNavigationRequest</a></b> (<i>self</i>, QWebFrame&#160;<i>frame</i>, QNetworkRequest&#160;<i>request</i>, NavigationType&#160;<i>type</i>)</li><li><div class="fn" />QAction <b><a href="qwebpage.html#action">action</a></b> (<i>self</i>, WebAction&#160;<i>action</i>)</li><li><div class="fn" />int <b><a href="qwebpage.html#bytesReceived">bytesReceived</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebpage.html#chooseFile">chooseFile</a></b> (<i>self</i>, QWebFrame&#160;<i>originatingFrame</i>, QString&#160;<i>oldFile</i>)</li><li><div class="fn" />QObject <b><a href="qwebpage.html#createPlugin">createPlugin</a></b> (<i>self</i>, QString&#160;<i>classid</i>, QUrl&#160;<i>url</i>, QStringList&#160;<i>paramNames</i>, QStringList&#160;<i>paramValues</i>)</li><li><div class="fn" />QMenu <b><a href="qwebpage.html#createStandardContextMenu">createStandardContextMenu</a></b> (<i>self</i>)</li><li><div class="fn" />QWebPage <b><a href="qwebpage.html#createWindow">createWindow</a></b> (<i>self</i>, WebWindowType&#160;<i>type</i>)</li><li><div class="fn" />QWebFrame <b><a href="qwebpage.html#currentFrame">currentFrame</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />bool <b><a href="qwebpage.html#extension">extension</a></b> (<i>self</i>, Extension&#160;<i>extension</i>, ExtensionOption&#160;<i>option</i>&#160;=&#160;None, ExtensionReturn&#160;<i>output</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qwebpage.html#findText">findText</a></b> (<i>self</i>, QString&#160;<i>subString</i>, FindFlags&#160;<i>options</i>&#160;=&#160;0)</li><li><div class="fn" />bool <b><a href="qwebpage.html#focusNextPrevChild">focusNextPrevChild</a></b> (<i>self</i>, bool&#160;<i>next</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#forwardUnsupportedContent">forwardUnsupportedContent</a></b> (<i>self</i>)</li><li><div class="fn" />QWebFrame <b><a href="qwebpage.html#frameAt">frameAt</a></b> (<i>self</i>, QPoint&#160;<i>pos</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#hasSelection">hasSelection</a></b> (<i>self</i>)</li><li><div class="fn" />QWebHistory <b><a href="qwebpage.html#history">history</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qwebpage.html#inputMethodQuery">inputMethodQuery</a></b> (<i>self</i>, Qt.InputMethodQuery&#160;<i>property</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#isContentEditable">isContentEditable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#isModified">isModified</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#javaScriptAlert">javaScriptAlert</a></b> (<i>self</i>, QWebFrame&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#javaScriptConfirm">javaScriptConfirm</a></b> (<i>self</i>, QWebFrame&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#javaScriptConsoleMessage">javaScriptConsoleMessage</a></b> (<i>self</i>, QString&#160;<i>message</i>, int&#160;<i>lineNumber</i>, QString&#160;<i>sourceID</i>)</li><li><div class="fn" />(bool, QString&#160;<i>result</i>) <b><a href="qwebpage.html#javaScriptPrompt">javaScriptPrompt</a></b> (<i>self</i>, QWebFrame&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>, QString&#160;<i>defaultValue</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#javaScriptPrompt-2">javaScriptPrompt</a></b> (<i>self</i>, QWebFrame&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>, QString&#160;<i>defaultValue</i>, QString&#160;<i>result</i>)</li><li><div class="fn" />LinkDelegationPolicy <b><a href="qwebpage.html#linkDelegationPolicy">linkDelegationPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />QWebFrame <b><a href="qwebpage.html#mainFrame">mainFrame</a></b> (<i>self</i>)</li><li><div class="fn" />QNetworkAccessManager <b><a href="qwebpage.html#networkAccessManager">networkAccessManager</a></b> (<i>self</i>)</li><li><div class="fn" />QPalette <b><a href="qwebpage.html#palette">palette</a></b> (<i>self</i>)</li><li><div class="fn" />QWebPluginFactory <b><a href="qwebpage.html#pluginFactory">pluginFactory</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qwebpage.html#preferredContentsSize">preferredContentsSize</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebpage.html#selectedHtml">selectedHtml</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebpage.html#selectedText">selectedText</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setActualVisibleContentRect">setActualVisibleContentRect</a></b> (<i>self</i>, QRect&#160;<i>rect</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setContentEditable">setContentEditable</a></b> (<i>self</i>, bool&#160;<i>editable</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setFeaturePermission">setFeaturePermission</a></b> (<i>self</i>, QWebFrame&#160;<i>frame</i>, Feature&#160;<i>feature</i>, PermissionPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setForwardUnsupportedContent">setForwardUnsupportedContent</a></b> (<i>self</i>, bool&#160;<i>forward</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setLinkDelegationPolicy">setLinkDelegationPolicy</a></b> (<i>self</i>, LinkDelegationPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setNetworkAccessManager">setNetworkAccessManager</a></b> (<i>self</i>, QNetworkAccessManager&#160;<i>manager</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setPalette">setPalette</a></b> (<i>self</i>, QPalette&#160;<i>palette</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setPluginFactory">setPluginFactory</a></b> (<i>self</i>, QWebPluginFactory&#160;<i>factory</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setPreferredContentsSize">setPreferredContentsSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" />QWebSettings <b><a href="qwebpage.html#settings">settings</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setView">setView</a></b> (<i>self</i>, QWidget&#160;<i>view</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#setViewportSize">setViewportSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#shouldInterruptJavaScript">shouldInterruptJavaScript</a></b> (<i>self</i>)</li><li><div class="fn" />QStringList <b><a href="qwebpage.html#supportedContentTypes">supportedContentTypes</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#supportsContentType">supportsContentType</a></b> (<i>self</i>, QString&#160;<i>mimeType</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#supportsExtension">supportsExtension</a></b> (<i>self</i>, Extension&#160;<i>extension</i>)</li><li><div class="fn" />bool <b><a href="qwebpage.html#swallowContextMenuEvent">swallowContextMenuEvent</a></b> (<i>self</i>, QContextMenuEvent&#160;<i>event</i>)</li><li><div class="fn" />int <b><a href="qwebpage.html#totalBytes">totalBytes</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#triggerAction">triggerAction</a></b> (<i>self</i>, WebAction&#160;<i>action</i>, bool&#160;<i>checked</i>&#160;=&#160;False)</li><li><div class="fn" />QUndoStack <b><a href="qwebpage.html#undoStack">undoStack</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebpage.html#updatePositionDependentActions">updatePositionDependentActions</a></b> (<i>self</i>, QPoint&#160;<i>pos</i>)</li><li><div class="fn" />QString <b><a href="qwebpage.html#userAgentForUrl">userAgentForUrl</a></b> (<i>self</i>, QUrl&#160;<i>url</i>)</li><li><div class="fn" />QWidget <b><a href="qwebpage.html#view">view</a></b> (<i>self</i>)</li><li><div class="fn" />ViewportAttributes <b><a href="qwebpage.html#viewportAttributesForSize">viewportAttributesForSize</a></b> (<i>self</i>, QSize&#160;<i>availableSize</i>)</li><li><div class="fn" />QSize <b><a href="qwebpage.html#viewportSize">viewportSize</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qwebpage.html#applicationCacheQuotaExceeded">applicationCacheQuotaExceeded</a></b> (QWebSecurityOrigin *,quint64)</li><li><div class="fn" />void <b><a href="qwebpage.html#contentsChanged">contentsChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qwebpage.html#databaseQuotaExceeded">databaseQuotaExceeded</a></b> (QWebFrame *,QString)</li><li><div class="fn" />void <b><a href="qwebpage.html#downloadRequested">downloadRequested</a></b> (const QNetworkRequest&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#featurePermissionRequestCanceled">featurePermissionRequestCanceled</a></b> (QWebFrame *,QWebPage::Feature)</li><li><div class="fn" />void <b><a href="qwebpage.html#featurePermissionRequested">featurePermissionRequested</a></b> (QWebFrame *,QWebPage::Feature)</li><li><div class="fn" />void <b><a href="qwebpage.html#frameCreated">frameCreated</a></b> (QWebFrame *)</li><li><div class="fn" />void <b><a href="qwebpage.html#geometryChangeRequested">geometryChangeRequested</a></b> (const QRect&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#linkClicked">linkClicked</a></b> (const QUrl&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#linkHovered">linkHovered</a></b> (const QString&amp;,const QString&amp;,const QString&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#loadFinished">loadFinished</a></b> (bool)</li><li><div class="fn" />void <b><a href="qwebpage.html#loadProgress">loadProgress</a></b> (int)</li><li><div class="fn" />void <b><a href="qwebpage.html#loadStarted">loadStarted</a></b> ()</li><li><div class="fn" />void <b><a href="qwebpage.html#menuBarVisibilityChangeRequested">menuBarVisibilityChangeRequested</a></b> (bool)</li><li><div class="fn" />void <b><a href="qwebpage.html#microFocusChanged">microFocusChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qwebpage.html#printRequested">printRequested</a></b> (QWebFrame *)</li><li><div class="fn" />void <b><a href="qwebpage.html#repaintRequested">repaintRequested</a></b> (const QRect&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#restoreFrameStateRequested">restoreFrameStateRequested</a></b> (QWebFrame *)</li><li><div class="fn" />void <b><a href="qwebpage.html#saveFrameStateRequested">saveFrameStateRequested</a></b> (QWebFrame *,QWebHistoryItem *)</li><li><div class="fn" />void <b><a href="qwebpage.html#scrollRequested">scrollRequested</a></b> (int,int,const QRect&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#selectionChanged">selectionChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qwebpage.html#statusBarMessage">statusBarMessage</a></b> (const QString&amp;)</li><li><div class="fn" />void <b><a href="qwebpage.html#statusBarVisibilityChangeRequested">statusBarVisibilityChangeRequested</a></b> (bool)</li><li><div class="fn" />void <b><a href="qwebpage.html#toolBarVisibilityChangeRequested">toolBarVisibilityChangeRequested</a></b> (bool)</li><li><div class="fn" />void <b><a href="qwebpage.html#unsupportedContent">unsupportedContent</a></b> (QNetworkReply *)</li><li><div class="fn" />void <b><a href="qwebpage.html#viewportChangeRequested">viewportChangeRequested</a></b> ()</li><li><div class="fn" />void <b><a href="qwebpage.html#windowCloseRequested">windowCloseRequested</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWebPage class provides an object to view and edit web
documents.</p>
<p>QWebPage holds a main frame responsible for web content,
settings, the history of navigated links and actions. This class
can be used, together with <a href="qwebframe.html">QWebFrame</a>,
to provide functionality like <a href="qwebview.html">QWebView</a>
in a widget-less environment.</p>
<p>QWebPage's API is very similar to <a href="qwebview.html">QWebView</a>, as you are still provided with common
functions like <a href="qwebpage.html#action">action</a>() (known
as <a href="qwebview.html#pageAction">pageAction</a>() in <a href="qwebview.html">QWebView</a>), <a href="qwebpage.html#triggerAction">triggerAction</a>(), <a href="qwebpage.html#findText">findText</a>() and <a href="qwebpage.html#settings">settings</a>(). More <a href="qwebview.html">QWebView</a>-like functions can be found in the
main frame of QWebPage, obtained via the <a href="qwebpage.html#mainFrame">mainFrame</a>() function. For example,
the <a href="qwebframe.html#load">load</a>(), <a href="qwebframe.html#url-prop">setUrl</a>() and <a href="qwebframe.html#setHtml">setHtml</a>() functions for QWebPage can
be accessed using <a href="qwebframe.html">QWebFrame</a>.</p>
<p>The <a href="qwebpage.html#loadStarted">loadStarted</a>() signal
is emitted when the page begins to load.The <a href="qwebpage.html#loadProgress">loadProgress</a>() signal, on the
other hand, is emitted whenever an element of the web page
completes loading, such as an embedded image, a script, etc.
Finally, the <a href="qwebpage.html#loadFinished">loadFinished</a>() signal is emitted
when the page contents are loaded completely, independent of script
execution or page rendering. Its argument, either true or false,
indicates whether or not the load operation succeeded.</p>
<a id="using-qwebpage-in-a-widget-less-environment" name="using-qwebpage-in-a-widget-less-environment" />
<h3>Using QWebPage in a Widget-less Environment</h3>
<p>Before you begin painting a QWebPage object, you need to set the
size of the viewport by calling <a href="qwebpage.html#viewportSize-prop">setViewportSize</a>(). Then, you
invoke the main frame's render function (<a href="qwebframe.html#render">QWebFrame.render</a>()). An example of
this is shown in the code snippet below.</p>
<p>Suppose we have a <tt>Thumbnail</tt> class as follows:</p>
<pre class="cpp">
 <span class="keyword">class</span> Thumbnailer : <span class="keyword">public</span> <span class="type"><a href="qobject.html">QObject</a></span>
 {
     Q_OBJECT

 <span class="keyword">public</span>:
     Thumbnailer(<span class="keyword">const</span> <span class="type"><a href="qurl.html">QUrl</a></span> <span class="operator">&amp;</span>url);

 <span class="keyword">signals</span>:
     <span class="type">void</span> finished();

 <span class="keyword">private</span> <span class="keyword">slots</span>:
     <span class="type">void</span> render();

 <span class="keyword">private</span>:
     <span class="type">QWebPage</span> page;

 };
</pre>
<p>The <tt>Thumbnail</tt>'s constructor takes in a <i>url</i>. We
connect our QWebPage object's <a href="qwebpage.html#loadFinished">loadFinished()</a> signal to our
private slot, <tt>render()</tt>.</p>
<pre class="cpp">
 Thumbnailer<span class="operator">.</span>Thumbnailer(<span class="keyword">const</span> <span class="type"><a href="qurl.html">QUrl</a></span> <span class="operator">&amp;</span>url)
 {
     page<span class="operator">.</span>mainFrame()<span class="operator">-</span><span class="operator">&gt;</span>load(url);
     connect(<span class="operator">&amp;</span>page<span class="operator">,</span> SIGNAL(loadFinished(<span class="type">bool</span>))<span class="operator">,</span>
         <span class="keyword">this</span><span class="operator">,</span> SLOT(render()));
 }
</pre>
<p>The <tt>render()</tt> function shows how we can paint a
thumbnail using a QWebPage object.</p>
<pre class="cpp">
 <span class="type">void</span> Thumbnailer<span class="operator">.</span>render()
 {
     page<span class="operator">.</span>setViewportSize(page<span class="operator">.</span>mainFrame()<span class="operator">-</span><span class="operator">&gt;</span>contentsSize());
     <span class="type"><a href="qimage.html">QImage</a></span> image(page<span class="operator">.</span>viewportSize()<span class="operator">,</span> <span class="type"><a href="qimage.html">QImage</a></span><span class="operator">.</span>Format_ARGB32);
     <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="operator">&amp;</span>image);

     page<span class="operator">.</span>mainFrame()<span class="operator">-</span><span class="operator">&gt;</span>render(<span class="operator">&amp;</span>painter);
     painter<span class="operator">.</span>end();

     <span class="type"><a href="qimage.html">QImage</a></span> thumbnail <span class="operator">=</span> image<span class="operator">.</span>scaled(<span class="number">400</span><span class="operator">,</span> <span class="number">400</span>);
     thumbnail<span class="operator">.</span>save(<span class="string">"thumbnail.png"</span>);

     <span class="keyword">emit</span> finished();
 }
</pre>
<p>We begin by setting the <a href="qwebpage.html#viewportSize-prop">viewportSize</a> and then we
instantiate a <a href="qimage.html">QImage</a> object,
<tt>image</tt>, with the same size as our <a href="qwebpage.html#viewportSize-prop">viewportSize</a>. This image is
then sent as a parameter to <tt>painter</tt>. Next, we render the
contents of the main frame and its subframes into <tt>painter</tt>.
Finally, we save the scaled image.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ErrorDomain-enum" />QWebPage.ErrorDomain</h3><p>This enum describes the domain of an <a href="qwebpage-errorpageextensionoption.html">ErrorPageExtensionOption</a>
object (i.e. the layer in which the error occurred).</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.QtNetwork</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The error occurred in the QtNetwork layer; the
error code is of type <a href="qnetworkreply.html#NetworkError-enum">QNetworkReply.NetworkError</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Http</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The error occurred in the HTTP layer; the
error code is a HTTP status code (see <a href="qnetworkrequest.html#Attribute-enum">QNetworkRequest.HttpStatusCodeAttribute</a>).</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.WebKit</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The error is an internal WebKit error.</td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.6.</p>


<h3 class="fn"><a name="Extension-enum" />QWebPage.Extension</h3><p>This enum describes the types of extensions that the page can
support. Before using these extensions, you should verify that the
extension is supported by calling <a href="qwebpage.html#supportsExtension">supportsExtension</a>().</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.ChooseMultipleFilesExtension</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Whether the web page supports multiple file
selection. This extension is invoked when the web content requests
one or more file names, for example as a result of the user
clicking on a "file upload" button in a HTML form where multiple
file selection is allowed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ErrorPageExtension</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Whether the web page can provide an error page
when loading fails. (introduced in Qt 4.6)</td>
</tr>
</table>
<p><b>See also</b> <a href="qwebpage-choosemultiplefilesextensionoption.html">ChooseMultipleFilesExtensionOption</a>,
<a href="qwebpage-choosemultiplefilesextensionreturn.html">ChooseMultipleFilesExtensionReturn</a>,
<a href="qwebpage-errorpageextensionoption.html">ErrorPageExtensionOption</a>,
and <a href="qwebpage-errorpageextensionreturn.html">ErrorPageExtensionReturn</a>.</p>


<h3 class="fn"><a name="Feature-enum" />QWebPage.Feature</h3><h3 class="fn"><a name="FindFlag-enum" />QWebPage.FindFlag</h3><p>This enum describes the options available to the <a href="qwebpage.html#findText">findText</a>() function. The options can
be OR-ed together from the following list:</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.FindBackward</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Searches backwards instead of forwards.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.FindCaseSensitively</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">By default <a href="qwebpage.html#findText">findText</a>() works case insensitive.
Specifying this option changes the behaviour to a case sensitive
find operation.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.FindWrapsAroundDocument</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Makes <a href="qwebpage.html#findText">findText</a>() restart from the beginning
of the document if the end was reached and the text was not
found.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.HighlightAllOccurrences</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Highlights all existing occurrences of a
specific string. (This value was introduced in 4.6.)</td>
</tr>
</table>
<p>The FindFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;FindFlag&gt;. It stores an OR
combination of FindFlag values.</p>


<h3 class="fn"><a name="LinkDelegationPolicy-enum" />QWebPage.LinkDelegationPolicy</h3><p>This enum defines the delegation policies a webpage can have
when activating links and emitting the <a href="qwebpage.html#linkClicked">linkClicked</a>() signal.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DontDelegateLinks</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">No links are delegated. Instead, <a href="qwebpage.html">QWebPage</a> tries to handle them all.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DelegateExternalLinks</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">When activating links that point to documents
not stored on the local filesystem or an equivalent - such as the
Qt resource system - then <a href="qwebpage.html#linkClicked">linkClicked</a>() is emitted.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DelegateAllLinks</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Whenever a link is activated the <a href="qwebpage.html#linkClicked">linkClicked</a>() signal is
emitted.</td>
</tr>
</table>
<p><b>See also</b> <a href="qwebpage.html#linkDelegationPolicy-prop">QWebPage.linkDelegationPolicy</a>.</p>


<h3 class="fn"><a name="NavigationType-enum" />QWebPage.NavigationType</h3><p>This enum describes the types of navigation available when
browsing through hyperlinked documents.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.NavigationTypeLinkClicked</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The user clicked on a link or pressed return
on a focused link.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.NavigationTypeFormSubmitted</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The user activated a submit button for an HTML
form.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.NavigationTypeBackOrForward</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Navigation to a previously shown document in
the back or forward history is requested.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.NavigationTypeReload</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The user activated the reload action.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.NavigationTypeFormResubmitted</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">An HTML form was submitted a second time.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.NavigationTypeOther</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">A navigation to another document using a
method not listed above.</td>
</tr>
</table>
<p><b>See also</b> <a href="qwebpage.html#acceptNavigationRequest">acceptNavigationRequest</a>().</p>


<h3 class="fn"><a name="PermissionPolicy-enum" />QWebPage.PermissionPolicy</h3><h3 class="fn"><a name="WebAction-enum" />QWebPage.WebAction</h3><p>This enum describes the types of action which can be performed
on the web page.</p>
<p>Actions only have an effect when they are applicable. The
availability of actions can be be determined by checking <a href="qaction.html#enabled-prop">isEnabled()</a> on the action returned
by <a href="qwebpage.html#action">action</a>().</p>
<p>One method of enabling the text editing, cursor movement, and
text selection actions is by setting <a href="qwebpage.html#contentEditable-prop">contentEditable</a> to
true.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.NoWebAction</tt></td>
<td class="topAlign"><tt>-1</tt></td>
<td class="topAlign">No action is triggered.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.OpenLink</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Open the current link.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.OpenLinkInNewWindow</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Open the current link in a new window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.OpenFrameInNewWindow</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Replicate the current frame in a new
window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DownloadLinkToDisk</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Download the current link to the disk.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.CopyLinkToClipboard</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Copy the current link to the clipboard.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.OpenImageInNewWindow</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Open the highlighted image in a new
window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DownloadImageToDisk</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Download the highlighted image to the
disk.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.CopyImageToClipboard</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Copy the highlighted image to the
clipboard.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.CopyImageUrlToClipboard</tt></td>
<td class="topAlign"><tt>68</tt></td>
<td class="topAlign">Copy the highlighted image's URL to the
clipboard.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Back</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">Navigate back in the history of navigated
links.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Forward</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">Navigate forward in the history of navigated
links.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Stop</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">Stop loading the current page.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.StopScheduledPageRefresh</tt></td>
<td class="topAlign"><tt>67</tt></td>
<td class="topAlign">Stop all pending page refresh/redirect
requests.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Reload</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">Reload the current page.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ReloadAndBypassCache</tt></td>
<td class="topAlign"><tt>53</tt></td>
<td class="topAlign">Reload the current page, but do not use any
local cache. (Added in Qt 4.6)</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Cut</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">Cut the content currently selected into the
clipboard.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Copy</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">Copy the content currently selected into the
clipboard.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Paste</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">Paste content from the clipboard.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Undo</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">Undo the last editing action.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Redo</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">Redo the last editing action.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToNextChar</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">Move the cursor to the next character.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToPreviousChar</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">Move the cursor to the previous
character.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToNextWord</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">Move the cursor to the next word.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToPreviousWord</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">Move the cursor to the previous word.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToNextLine</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">Move the cursor to the next line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToPreviousLine</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">Move the cursor to the previous line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToStartOfLine</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">Move the cursor to the start of the line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToEndOfLine</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">Move the cursor to the end of the line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToStartOfBlock</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">Move the cursor to the start of the
block.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToEndOfBlock</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">Move the cursor to the end of the block.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToStartOfDocument</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">Move the cursor to the start of the
document.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.MoveToEndOfDocument</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign">Move the cursor to the end of the
document.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectNextChar</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign">Select to the next character.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectPreviousChar</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign">Select to the previous character.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectNextWord</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">Select to the next word.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectPreviousWord</tt></td>
<td class="topAlign"><tt>32</tt></td>
<td class="topAlign">Select to the previous word.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectNextLine</tt></td>
<td class="topAlign"><tt>33</tt></td>
<td class="topAlign">Select to the next line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectPreviousLine</tt></td>
<td class="topAlign"><tt>34</tt></td>
<td class="topAlign">Select to the previous line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectStartOfLine</tt></td>
<td class="topAlign"><tt>35</tt></td>
<td class="topAlign">Select to the start of the line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectEndOfLine</tt></td>
<td class="topAlign"><tt>36</tt></td>
<td class="topAlign">Select to the end of the line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectStartOfBlock</tt></td>
<td class="topAlign"><tt>37</tt></td>
<td class="topAlign">Select to the start of the block.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectEndOfBlock</tt></td>
<td class="topAlign"><tt>38</tt></td>
<td class="topAlign">Select to the end of the block.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectStartOfDocument</tt></td>
<td class="topAlign"><tt>39</tt></td>
<td class="topAlign">Select to the start of the document.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectEndOfDocument</tt></td>
<td class="topAlign"><tt>40</tt></td>
<td class="topAlign">Select to the end of the document.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DeleteStartOfWord</tt></td>
<td class="topAlign"><tt>41</tt></td>
<td class="topAlign">Delete to the start of the word.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.DeleteEndOfWord</tt></td>
<td class="topAlign"><tt>42</tt></td>
<td class="topAlign">Delete to the end of the word.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.SetTextDirectionDefault</tt></td>
<td class="topAlign"><tt>43</tt></td>
<td class="topAlign">Set the text direction to the default
direction.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.SetTextDirectionLeftToRight</tt></td>
<td class="topAlign"><tt>44</tt></td>
<td class="topAlign">Set the text direction to left-to-right.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.SetTextDirectionRightToLeft</tt></td>
<td class="topAlign"><tt>45</tt></td>
<td class="topAlign">Set the text direction to right-to-left.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ToggleBold</tt></td>
<td class="topAlign"><tt>46</tt></td>
<td class="topAlign">Toggle the formatting between bold and normal
weight.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ToggleItalic</tt></td>
<td class="topAlign"><tt>47</tt></td>
<td class="topAlign">Toggle the formatting between italic and
normal style.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ToggleUnderline</tt></td>
<td class="topAlign"><tt>48</tt></td>
<td class="topAlign">Toggle underlining.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.InspectElement</tt></td>
<td class="topAlign"><tt>49</tt></td>
<td class="topAlign">Show the Web Inspector with the currently
highlighted HTML element.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QWebPage.InsertParagraphSeparator</tt></td>
<td class="topAlign"><tt>50</tt></td>
<td class="topAlign">Insert a new paragraph.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.InsertLineSeparator</tt></td>
<td class="topAlign"><tt>51</tt></td>
<td class="topAlign">Insert a new line.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.SelectAll</tt></td>
<td class="topAlign"><tt>52</tt></td>
<td class="topAlign">Selects all content.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.PasteAndMatchStyle</tt></td>
<td class="topAlign"><tt>54</tt></td>
<td class="topAlign">Paste content from the clipboard with current
style.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.RemoveFormat</tt></td>
<td class="topAlign"><tt>55</tt></td>
<td class="topAlign">Removes formatting and style.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ToggleStrikethrough</tt></td>
<td class="topAlign"><tt>56</tt></td>
<td class="topAlign">Toggle the formatting between strikethrough
and normal style.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ToggleSubscript</tt></td>
<td class="topAlign"><tt>57</tt></td>
<td class="topAlign">Toggle the formatting between subscript and
baseline.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.ToggleSuperscript</tt></td>
<td class="topAlign"><tt>58</tt></td>
<td class="topAlign">Toggle the formatting between supercript and
baseline.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.InsertUnorderedList</tt></td>
<td class="topAlign"><tt>59</tt></td>
<td class="topAlign">Toggles the selection between an ordered list
and a normal block.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.InsertOrderedList</tt></td>
<td class="topAlign"><tt>60</tt></td>
<td class="topAlign">Toggles the selection between an ordered list
and a normal block.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Indent</tt></td>
<td class="topAlign"><tt>61</tt></td>
<td class="topAlign">Increases the indentation of the currently
selected format block by one increment.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.Outdent</tt></td>
<td class="topAlign"><tt>62</tt></td>
<td class="topAlign">Decreases the indentation of the currently
selected format block by one increment.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.AlignCenter</tt></td>
<td class="topAlign"><tt>63</tt></td>
<td class="topAlign">Applies center alignment to content.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.AlignJustified</tt></td>
<td class="topAlign"><tt>64</tt></td>
<td class="topAlign">Applies full justification to content.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.AlignLeft</tt></td>
<td class="topAlign"><tt>65</tt></td>
<td class="topAlign">Applies left justification to content.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.AlignRight</tt></td>
<td class="topAlign"><tt>66</tt></td>
<td class="topAlign">Applies right justification to content.</td>
</tr>
</table>


<h3 class="fn"><a name="WebWindowType-enum" />QWebPage.WebWindowType</h3><p>This enum describes the types of window that can be created by
the <a href="qwebpage.html#createWindow">createWindow</a>()
function.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.WebBrowserWindow</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The window is a regular web browser
window.</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebPage.WebModalDialog</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The window acts as modal dialog.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QWebPage" />QWebPage.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty <a href="qwebpage.html">QWebPage</a> with
parent <i>parent</i>.</p>


<h3 class="fn"><a name="acceptNavigationRequest" />bool QWebPage.acceptNavigationRequest (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>frame</i>, <a href="qnetworkrequest.html">QNetworkRequest</a>&#160;<i>request</i>, <a href="qwebpage.html#NavigationType-enum">NavigationType</a>&#160;<i>type</i>)</h3><p>This function is called whenever <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> requests to navigate
<i>frame</i> to the resource specified by <i>request</i> by means
of the specified navigation type <i>type</i>.</p>
<p>If <i>frame</i> is a null pointer then navigation to a new
window is requested. If the request is accepted <a href="qwebpage.html#createWindow">createWindow</a>() will be called.</p>
<p>The default implementation interprets the page's <a href="qwebpage.html#linkDelegationPolicy-prop">linkDelegationPolicy</a>
and emits linkClicked accordingly or returns true to let <a href="qwebpage.html">QWebPage</a> handle the navigation itself.</p>
<p><b>See also</b> <a href="qwebpage.html#createWindow">createWindow</a>().</p>


<h3 class="fn"><a name="action" /><a href="qaction.html">QAction</a> QWebPage.action (<i>self</i>, <a href="qwebpage.html#WebAction-enum">WebAction</a>&#160;<i>action</i>)</h3><p>Returns a <a href="qaction.html">QAction</a> for the specified
<a href="qwebpage.html#WebAction-enum">WebAction</a>
<i>action</i>.</p>
<p>The action is owned by the <a href="qwebpage.html">QWebPage</a>
but you can customize the look by changing its properties.</p>
<p><a href="qwebpage.html">QWebPage</a> also takes care of
implementing the action, so that upon triggering the corresponding
action is performed on the page.</p>
<p><b>See also</b> <a href="qwebpage.html#triggerAction">triggerAction</a>().</p>


<h3 class="fn"><a name="bytesReceived" />int QWebPage.bytesReceived (<i>self</i>)</h3><p>Returns the number of bytes that were received from the network
to render the current page.</p>
<p><b>See also</b> <a href="qwebpage.html#totalBytes">totalBytes</a>() and <a href="qwebpage.html#loadProgress">loadProgress</a>().</p>


<h3 class="fn"><a name="chooseFile" />QString QWebPage.chooseFile (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>originatingFrame</i>, QString&#160;<i>oldFile</i>)</h3><p>This function is called when the web content requests a file
name, for example as a result of the user clicking on a "file
upload" button in a HTML form.</p>
<p>A suggested filename may be provided in <i>suggestedFile</i>.
The frame originating the request is provided as
<i>parentFrame</i>.</p>
<p><b>See also</b> <a href="qwebpage.html#Extension-enum">ChooseMultipleFilesExtension</a>.</p>


<h3 class="fn"><a name="createPlugin" /><a href="qobject.html">QObject</a> QWebPage.createPlugin (<i>self</i>, QString&#160;<i>classid</i>, <a href="qurl.html">QUrl</a>&#160;<i>url</i>, QStringList&#160;<i>paramNames</i>, QStringList&#160;<i>paramValues</i>)</h3><p>This function is called whenever <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> encounters a HTML
object element with type "application/x-qt-plugin". It is called
regardless of the value of <a href="qwebsettings.html#WebAttribute-enum">QWebSettings.PluginsEnabled</a>.
The <i>classid</i>, <i>url</i>, <i>paramNames</i> and
<i>paramValues</i> correspond to the HTML object element attributes
and child elements to configure the embeddable object.</p>


<h3 class="fn"><a name="createStandardContextMenu" /><a href="qmenu.html">QMenu</a> QWebPage.createStandardContextMenu (<i>self</i>)</h3><p>This function creates the standard context menu which is shown
when the user clicks on the web page with the right mouse button.
It is called from the default contextMenuEvent() handler. The popup
menu's ownership is transferred to the caller.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="createWindow" /><a href="qwebpage.html">QWebPage</a> QWebPage.createWindow (<i>self</i>, <a href="qwebpage.html#WebWindowType-enum">WebWindowType</a>&#160;<i>type</i>)</h3><p>This function is called whenever <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> wants to create a new
window of the given <i>type</i>, for example when a JavaScript
program requests to open a document in a new window.</p>
<p>If the new window can be created, the new window's <a href="qwebpage.html">QWebPage</a> is returned; otherwise a null pointer
is returned.</p>
<p>If the view associated with the web page is a <a href="qwebview.html">QWebView</a> object, then the default
implementation forwards the request to <a href="qwebview.html">QWebView</a>'s createWindow() function; otherwise
it returns a null pointer.</p>
<p>If <i>type</i> is <a href="qwebpage.html#WebWindowType-enum">WebModalDialog</a>, the
application must call setWindowModality(<a href="qt.html#WindowModality-enum">Qt.ApplicationModal</a>) on the new
window.</p>
<p><b>Note:</b> In the cases when the window creation is being
triggered by JavaScript, apart from reimplementing this method
application must also set the JavaScriptCanOpenWindows attribute of
<a href="qwebsettings.html">QWebSettings</a> to true in order for
it to get called.</p>
<p><b>See also</b> <a href="qwebpage.html#acceptNavigationRequest">acceptNavigationRequest</a>()
and <a href="qwebview.html#createWindow">QWebView.createWindow</a>().</p>


<h3 class="fn"><a name="currentFrame" /><a href="qwebframe.html">QWebFrame</a> QWebPage.currentFrame (<i>self</i>)</h3><p>Returns the frame currently active.</p>
<p><b>See also</b> <a href="qwebpage.html#mainFrame">mainFrame</a>() and <a href="qwebpage.html#frameCreated">frameCreated</a>().</p>


<h3 class="fn"><a name="event" />bool QWebPage.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="extension" />bool QWebPage.extension (<i>self</i>, <a href="qwebpage.html#Extension-enum">Extension</a>&#160;<i>extension</i>, <a href="qwebpage-extensionoption.html">ExtensionOption</a>&#160;<i>option</i>&#160;=&#160;None, <a href="qwebpage-extensionreturn.html">ExtensionReturn</a>&#160;<i>output</i>&#160;=&#160;None)</h3><p>This virtual function can be reimplemented in a <a href="qwebpage.html">QWebPage</a> subclass to provide support for
extensions. The <i>option</i> argument is provided as input to the
extension; the output results can be stored in <i>output</i>.</p>
<p>The behavior of this function is determined by <i>extension</i>.
The <i>option</i> and <i>output</i> values are typically casted to
the corresponding types (for example, <a href="qwebpage-choosemultiplefilesextensionoption.html">ChooseMultipleFilesExtensionOption</a>
and <a href="qwebpage-choosemultiplefilesextensionreturn.html">ChooseMultipleFilesExtensionReturn</a>
for <a href="qwebpage.html#Extension-enum">ChooseMultipleFilesExtension</a>).</p>
<p>You can call <a href="qwebpage.html#supportsExtension">supportsExtension</a>() to check
if an extension is supported by the page.</p>
<p>Returns true if the extension was called successfully; otherwise
returns false.</p>
<p><b>See also</b> <a href="qwebpage.html#supportsExtension">supportsExtension</a>() and
<a href="qwebpage.html#Extension-enum">Extension</a>.</p>


<h3 class="fn"><a name="findText" />bool QWebPage.findText (<i>self</i>, QString&#160;<i>subString</i>, <a href="qwebpage-findflags.html">FindFlags</a>&#160;<i>options</i>&#160;=&#160;0)</h3><p>Finds the specified string, <i>subString</i>, in the page, using
the given <i>options</i>.</p>
<p>If the <a href="qwebpage.html#FindFlag-enum">HighlightAllOccurrences</a> flag is
passed, the function will highlight all occurrences that exist in
the page. All subsequent calls will extend the highlight, rather
than replace it, with occurrences of the new string.</p>
<p>If the <a href="qwebpage.html#FindFlag-enum">HighlightAllOccurrences</a> flag is
not passed, the function will select an occurrence and all
subsequent calls will replace the current occurrence with the next
one.</p>
<p>To clear the selection, just pass an empty string.</p>
<p>Returns true if <i>subString</i> was found; otherwise returns
false.</p>


<h3 class="fn"><a name="focusNextPrevChild" />bool QWebPage.focusNextPrevChild (<i>self</i>, bool&#160;<i>next</i>)</h3><p>Similar to <a href="qwidget.html#focusNextPrevChild">QWidget.focusNextPrevChild</a>()
it focuses the next focusable web element if <i>next</i> is true;
otherwise the previous element is focused.</p>
<p>Returns true if it can find a new focusable element, or false if
it can't.</p>


<h3 class="fn"><a name="forwardUnsupportedContent" />bool QWebPage.forwardUnsupportedContent (<i>self</i>)</h3><h3 class="fn"><a name="frameAt" /><a href="qwebframe.html">QWebFrame</a> QWebPage.frameAt (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pos</i>)</h3><p>Returns the frame at the given point <i>pos</i>, or 0 if there
is no frame at that position.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebpage.html#mainFrame">mainFrame</a>() and <a href="qwebpage.html#currentFrame">currentFrame</a>().</p>


<h3 class="fn"><a name="hasSelection" />bool QWebPage.hasSelection (<i>self</i>)</h3><h3 class="fn"><a name="history" /><a href="qwebhistory.html">QWebHistory</a> QWebPage.history (<i>self</i>)</h3><p>Returns a pointer to the view's history of navigated web
pages.</p>


<h3 class="fn"><a name="inputMethodQuery" />QVariant QWebPage.inputMethodQuery (<i>self</i>, <a href="qt.html#InputMethodQuery-enum">Qt.InputMethodQuery</a>&#160;<i>property</i>)</h3><p>This method is used by the input method to query a set of
properties of the page to be able to support complex input method
operations as support for surrounding text and reconversions.</p>
<p><i>property</i> specifies which property is queried.</p>
<p><b>See also</b> <a href="qwidget.html#inputMethodEvent">QWidget.inputMethodEvent</a>(),
<a href="qinputmethodevent.html">QInputMethodEvent</a>, and
<a href="qinputcontext.html">QInputContext</a>.</p>


<h3 class="fn"><a name="isContentEditable" />bool QWebPage.isContentEditable (<i>self</i>)</h3><h3 class="fn"><a name="isModified" />bool QWebPage.isModified (<i>self</i>)</h3><h3 class="fn"><a name="javaScriptAlert" />QWebPage.javaScriptAlert (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>)</h3><p>This function is called whenever a JavaScript program running
inside <i>frame</i> calls the alert() function with the message
<i>msg</i>.</p>
<p>The default implementation shows the message, <i>msg</i>, with
QMessageBox.information.</p>


<h3 class="fn"><a name="javaScriptConfirm" />bool QWebPage.javaScriptConfirm (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>)</h3><p>This function is called whenever a JavaScript program running
inside <i>frame</i> calls the confirm() function with the message,
<i>msg</i>. Returns true if the user confirms the message;
otherwise returns false.</p>
<p>The default implementation executes the query using
QMessageBox.information with <a href="qmessagebox.html#StandardButton-enum">QMessageBox.Yes</a> and
<a href="qmessagebox.html#StandardButton-enum">QMessageBox.No</a>
buttons.</p>


<h3 class="fn"><a name="javaScriptConsoleMessage" />QWebPage.javaScriptConsoleMessage (<i>self</i>, QString&#160;<i>message</i>, int&#160;<i>lineNumber</i>, QString&#160;<i>sourceID</i>)</h3><p>This function is called whenever a JavaScript program tries to
print a <i>message</i> to the web browser's console.</p>
<p>For example in case of evaluation errors the source URL may be
provided in <i>sourceID</i> as well as the <i>lineNumber</i>.</p>
<p>The default implementation prints nothing.</p>


<h3 class="fn"><a name="javaScriptPrompt" />(bool, QString&#160;<i>result</i>) QWebPage.javaScriptPrompt (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>, QString&#160;<i>defaultValue</i>)</h3><p>This function is called whenever a JavaScript program running
inside <i>frame</i> tries to prompt the user for input. The program
may provide an optional message, <i>msg</i>, as well as a default
value for the input in <i>defaultValue</i>.</p>
<p>If the prompt was cancelled by the user the implementation
should return false; otherwise the result should be written to
<i>result</i> and true should be returned. If the prompt was not
cancelled by the user, the implementation should return true and
the result string must not be null.</p>
<p>The default implementation uses <a href="qinputdialog.html#getText">QInputDialog.getText</a>().</p>


<h3 class="fn"><a name="javaScriptPrompt-2" />bool QWebPage.javaScriptPrompt (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>originatingFrame</i>, QString&#160;<i>msg</i>, QString&#160;<i>defaultValue</i>, QString&#160;<i>result</i>)</h3><h3 class="fn"><a name="linkDelegationPolicy" /><a href="qwebpage.html#LinkDelegationPolicy-enum">LinkDelegationPolicy</a> QWebPage.linkDelegationPolicy (<i>self</i>)</h3><h3 class="fn"><a name="mainFrame" /><a href="qwebframe.html">QWebFrame</a> QWebPage.mainFrame (<i>self</i>)</h3><p>Returns the main frame of the page.</p>
<p>The main frame provides access to the hierarchy of sub-frames
and is also needed if you want to explicitly render a web page into
a given painter.</p>
<p><b>See also</b> <a href="qwebpage.html#currentFrame">currentFrame</a>().</p>


<h3 class="fn"><a name="networkAccessManager" /><a href="qnetworkaccessmanager.html">QNetworkAccessManager</a> QWebPage.networkAccessManager (<i>self</i>)</h3><p>Returns the <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a> that is
responsible for serving network requests for this <a href="qwebpage.html">QWebPage</a>.</p>
<p><b>See also</b> <a href="qwebpage.html#setNetworkAccessManager">setNetworkAccessManager</a>().</p>


<h3 class="fn"><a name="palette" /><a href="qpalette.html">QPalette</a> QWebPage.palette (<i>self</i>)</h3><h3 class="fn"><a name="pluginFactory" /><a href="qwebpluginfactory.html">QWebPluginFactory</a> QWebPage.pluginFactory (<i>self</i>)</h3><p>Returns the <a href="qwebpluginfactory.html">QWebPluginFactory</a> that is responsible
for creating plugins embedded into this <a href="qwebpage.html">QWebPage</a>. If no plugin factory is installed a
null pointer is returned.</p>
<p><b>See also</b> <a href="qwebpage.html#setPluginFactory">setPluginFactory</a>().</p>


<h3 class="fn"><a name="preferredContentsSize" /><a href="qsize.html">QSize</a> QWebPage.preferredContentsSize (<i>self</i>)</h3><h3 class="fn"><a name="selectedHtml" />QString QWebPage.selectedHtml (<i>self</i>)</h3><h3 class="fn"><a name="selectedText" />QString QWebPage.selectedText (<i>self</i>)</h3><h3 class="fn"><a name="setActualVisibleContentRect" />QWebPage.setActualVisibleContentRect (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>rect</i>)</h3><h3 class="fn"><a name="setContentEditable" />QWebPage.setContentEditable (<i>self</i>, bool&#160;<i>editable</i>)</h3><h3 class="fn"><a name="setFeaturePermission" />QWebPage.setFeaturePermission (<i>self</i>, <a href="qwebframe.html">QWebFrame</a>&#160;<i>frame</i>, <a href="qwebpage.html#Feature-enum">Feature</a>&#160;<i>feature</i>, <a href="qwebpage.html#PermissionPolicy-enum">PermissionPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setForwardUnsupportedContent" />QWebPage.setForwardUnsupportedContent (<i>self</i>, bool&#160;<i>forward</i>)</h3><h3 class="fn"><a name="setLinkDelegationPolicy" />QWebPage.setLinkDelegationPolicy (<i>self</i>, <a href="qwebpage.html#LinkDelegationPolicy-enum">LinkDelegationPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setNetworkAccessManager" />QWebPage.setNetworkAccessManager (<i>self</i>, <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>&#160;<i>manager</i>)</h3><p>Sets the <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>
<i>manager</i> responsible for serving network requests for this
<a href="qwebpage.html">QWebPage</a>.</p>
<p><b>Note:</b> It is currently not supported to change the network
access manager after the <a href="qwebpage.html">QWebPage</a> has
used it. The results of doing this are undefined.</p>
<p><b>See also</b> <a href="qwebpage.html#networkAccessManager">networkAccessManager</a>().</p>


<h3 class="fn"><a name="setPalette" />QWebPage.setPalette (<i>self</i>, <a href="qpalette.html">QPalette</a>&#160;<i>palette</i>)</h3><h3 class="fn"><a name="setPluginFactory" />QWebPage.setPluginFactory (<i>self</i>, <a href="qwebpluginfactory.html">QWebPluginFactory</a>&#160;<i>factory</i>)</h3><p>Sets the <a href="qwebpluginfactory.html">QWebPluginFactory</a>
<i>factory</i> responsible for creating plugins embedded into this
<a href="qwebpage.html">QWebPage</a>.</p>
<p>Note: The plugin factory is only used if the <a href="qwebsettings.html#WebAttribute-enum">QWebSettings.PluginsEnabled</a>
attribute is enabled.</p>
<p><b>See also</b> <a href="qwebpage.html#pluginFactory">pluginFactory</a>().</p>


<h3 class="fn"><a name="setPreferredContentsSize" />QWebPage.setPreferredContentsSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><h3 class="fn"><a name="settings" /><a href="qwebsettings.html">QWebSettings</a> QWebPage.settings (<i>self</i>)</h3><p>Returns a pointer to the page's settings object.</p>
<p><b>See also</b> <a href="qwebsettings.html#globalSettings">QWebSettings.globalSettings</a>().</p>


<h3 class="fn"><a name="setView" />QWebPage.setView (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>view</i>)</h3><p>Sets the <i>view</i> that is associated with the web page.</p>
<p><b>See also</b> <a href="qwebpage.html#view">view</a>().</p>


<h3 class="fn"><a name="setViewportSize" />QWebPage.setViewportSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><h3 class="fn"><a name="shouldInterruptJavaScript" />bool QWebPage.shouldInterruptJavaScript (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>bool shouldInterruptJavaScript()</tt>.</p><p>This function is called when a JavaScript program is running for
a long period of time.</p>
<p>If the user wanted to stop the JavaScript the implementation
should return true; otherwise false.</p>
<p>The default implementation executes the query using
QMessageBox.information with <a href="qmessagebox.html#StandardButton-enum">QMessageBox.Yes</a> and
<a href="qmessagebox.html#StandardButton-enum">QMessageBox.No</a>
buttons.</p>
<p><b>Warning:</b> Because of binary compatibility constraints,
this function is not virtual. If you want to provide your own
implementation in a <a href="qwebpage.html">QWebPage</a> subclass,
reimplement the shouldInterruptJavaScript() slot in your subclass
instead. <a href="qtwebkit.html">QtWebKit</a> will dynamically
detect the slot and call it.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="supportedContentTypes" />QStringList QWebPage.supportedContentTypes (<i>self</i>)</h3><p>Returns the list of all content types supported by <a href="qwebpage.html">QWebPage</a>.</p>


<h3 class="fn"><a name="supportsContentType" />bool QWebPage.supportsContentType (<i>self</i>, QString&#160;<i>mimeType</i>)</h3><p>Returns true if <a href="qwebpage.html">QWebPage</a> can handle
the given <i>mimeType</i>; otherwise, returns false.</p>


<h3 class="fn"><a name="supportsExtension" />bool QWebPage.supportsExtension (<i>self</i>, <a href="qwebpage.html#Extension-enum">Extension</a>&#160;<i>extension</i>)</h3><p>This virtual function returns true if the web page supports
<i>extension</i>; otherwise false is returned.</p>
<p><b>See also</b> <a href="qwebpage.html#extension">extension</a>().</p>


<h3 class="fn"><a name="swallowContextMenuEvent" />bool QWebPage.swallowContextMenuEvent (<i>self</i>, <a href="qcontextmenuevent.html">QContextMenuEvent</a>&#160;<i>event</i>)</h3><p>Filters the context menu event, <i>event</i>, through handlers
for scrollbars and custom event handlers in the web page. Returns
true if the event was handled; otherwise false.</p>
<p>A web page may swallow a context menu event through a custom
event handler, allowing for context menus to be implemented in
HTML/JavaScript. This is used by <a href="http://maps.google.com/">Google Maps</a>, for example.</p>


<h3 class="fn"><a name="totalBytes" />int QWebPage.totalBytes (<i>self</i>)</h3><p>Returns the total number of bytes that were received from the
network to render the current page, including extra content such as
embedded images.</p>
<p><b>See also</b> <a href="qwebpage.html#bytesReceived">bytesReceived</a>().</p>


<h3 class="fn"><a name="triggerAction" />QWebPage.triggerAction (<i>self</i>, <a href="qwebpage.html#WebAction-enum">WebAction</a>&#160;<i>action</i>, bool&#160;<i>checked</i>&#160;=&#160;False)</h3><p>This function can be called to trigger the specified
<i>action</i>. It is also called by <a href="qtwebkit.html">QtWebKit</a> if the user triggers the action, for
example through a context menu item.</p>
<p>If <i>action</i> is a checkable action then <i>checked</i>
specified whether the action is toggled or not.</p>
<p><b>See also</b> <a href="qwebpage.html#action">action</a>().</p>


<h3 class="fn"><a name="undoStack" /><a href="qundostack.html">QUndoStack</a> QWebPage.undoStack (<i>self</i>)</h3><p>Returns a pointer to the undo stack used for editable
content.</p>
<p><b>See also</b> <a href="qwebpage.html#modified-prop">modified</a>.</p>


<h3 class="fn"><a name="updatePositionDependentActions" />QWebPage.updatePositionDependentActions (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pos</i>)</h3><p>Updates the page's actions depending on the position <i>pos</i>.
For example if <i>pos</i> is over an image element the <a href="qwebpage.html#WebAction-enum">CopyImageToClipboard</a> action is
enabled.</p>


<h3 class="fn"><a name="userAgentForUrl" />QString QWebPage.userAgentForUrl (<i>self</i>, <a href="qurl.html">QUrl</a>&#160;<i>url</i>)</h3><p>This function is called when a user agent for HTTP requests is
needed. You can reimplement this function to dynamically return
different user agents for different URLs, based on the <i>url</i>
parameter.</p>
<p>The default implementation returns the following value:</p>
<p>"Mozilla/5.0 (%Platform%%Security%%Subplatform%)
AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion
Safari/%WebKitVersion%"</p>
<p>On mobile platforms such as Symbian S60 and Maemo, "Mobile
Safari" is used instead of "Safari".</p>
<p>In this string the following values are replaced at
run-time:</p>
<ul>
<li>%Platform% expands to the windowing system followed by "; " if
it is not Windows (e.g. "X11; ").</li>
<li>%Security% expands to "N; " if SSL is disabled.</li>
<li>%Subplatform% expands to the operating system version (e.g.
"Windows NT 6.1" or "Intel Mac OS X 10.5").</li>
<li>%WebKitVersion% is the version of <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> the application was
compiled against.</li>
<li>%AppVersion% expands to <a href="qcoreapplication.html#applicationName-prop">QCoreApplication.applicationName</a>()/<a href="qcoreapplication.html#applicationVersion-prop">QCoreApplication.applicationVersion</a>()
if they're set; otherwise defaulting to Qt and the current Qt
version.</li>
</ul>


<h3 class="fn"><a name="view" /><a href="qwidget.html">QWidget</a> QWebPage.view (<i>self</i>)</h3><p>Returns the view widget that is associated with the web
page.</p>
<p><b>See also</b> <a href="qwebpage.html#setView">setView</a>().</p>


<h3 class="fn"><a name="viewportAttributesForSize" /><a href="qwebpage-viewportattributes.html">ViewportAttributes</a> QWebPage.viewportAttributesForSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>availableSize</i>)</h3><p>Computes the optimal viewport configuration given the
<i>availableSize</i>, when user interface components are
disregarded.</p>
<p>The configuration is also dependent on the device screen size
which is obtained automatically. For testing purposes the size can
be overridden by setting two environment variables
QTWEBKIT_DEVICE_WIDTH and QTWEBKIT_DEVICE_HEIGHT, which both needs
to be set.</p>
<p>The <a href="qwebpage-viewportattributes.html">ViewportAttributes</a> includes
a pixel density ratio, which will also be exposed to the web author
though the -webkit-pixel-ratio media feature. This is the ratio
between 1 density-independent pixel (DPI) and physical pixels.</p>
<p>A density-independent pixel is equivalent to one physical pixel
on a 160 DPI screen, so on our platform assumes that as the
baseline density.</p>
<p>The conversion of DIP units to screen pixels is quite
simple:</p>
<p>pixels = DIPs * (density / 160).</p>
<p>Thus, on a 240 DPI screen, 1 DIPs would equal 1.5 physical
pixels.</p>
<p>An invalid instance will be returned in the case an empty size
is passed to the method.</p>
<p><b>Note:</b> The density is automatically obtained from the DPI
of the screen where the page is being shown, but as many X11
servers are reporting wrong DPI, it is possible to override it
using <a href="qx11info.html#setAppDpiY">QX11Info.setAppDpiY</a>().</p>


<h3 class="fn"><a name="viewportSize" /><a href="qsize.html">QSize</a> QWebPage.viewportSize (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="applicationCacheQuotaExceeded" />void applicationCacheQuotaExceeded (QWebSecurityOrigin *,quint64)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the web site is asking to store
data to the application cache database databaseName and the quota
allocated to that web site is exceeded.</p>


<h3 class="fn"><a name="contentsChanged" />void contentsChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the text in form elements
changes as well as other editable content.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qwebpage.html#contentEditable-prop">contentEditable</a>, <a href="qwebpage.html#modified-prop">modified</a>, <a href="qwebframe.html#toHtml">QWebFrame.toHtml</a>(), and <a href="qwebframe.html#toPlainText">QWebFrame.toPlainText</a>().</p>


<h3 class="fn"><a name="databaseQuotaExceeded" />void databaseQuotaExceeded (QWebFrame *,QString)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the web site shown in
<i>frame</i> is asking to store data to the database
<i>databaseName</i> and the quota allocated to that web site is
exceeded.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qwebdatabase.html">QWebDatabase</a>.</p>


<h3 class="fn"><a name="downloadRequested" />void downloadRequested (const QNetworkRequest&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the user decides to download a link.
The url of the link as well as additional meta-information is
contained in <i>request</i>.</p>
<p><b>See also</b> <a href="qwebpage.html#unsupportedContent">unsupportedContent</a>().</p>


<h3 class="fn"><a name="featurePermissionRequestCanceled" />void featurePermissionRequestCanceled (QWebFrame *,QWebPage::Feature)</h3><p>This is the default overload of this signal.</p><h3 class="fn"><a name="featurePermissionRequested" />void featurePermissionRequested (QWebFrame *,QWebPage::Feature)</h3><p>This is the default overload of this signal.</p><h3 class="fn"><a name="frameCreated" />void frameCreated (QWebFrame *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the page creates a new
<i>frame</i>.</p>
<p><b>See also</b> <a href="qwebpage.html#currentFrame">currentFrame</a>().</p>


<h3 class="fn"><a name="geometryChangeRequested" />void geometryChangeRequested (const QRect&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the document wants to change the
position and size of the page to <i>geom</i>. This can happen for
example through JavaScript.</p>


<h3 class="fn"><a name="linkClicked" />void linkClicked (const QUrl&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the user clicks on a link and
the page's <a href="qwebpage.html#linkDelegationPolicy-prop">linkDelegationPolicy</a>
property is set to delegate the link handling for the specified
<i>url</i>.</p>
<p>By default no links are delegated and are handled by <a href="qwebpage.html">QWebPage</a> instead.</p>
<p><b>Note:</b> This signal possibly won't be emitted for clicked
links which use JavaScript to trigger navigation.</p>
<p><b>See also</b> <a href="qwebpage.html#linkHovered">linkHovered</a>().</p>


<h3 class="fn"><a name="linkHovered" />void linkHovered (const QString&amp;,const QString&amp;,const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the mouse hovers over a link.</p>
<p><i>link</i> contains the link url. <i>title</i> is the link
element's title, if it is specified in the markup.
<i>textContent</i> provides text within the link element, e.g.,
text inside an HTML anchor tag.</p>
<p>When the mouse leaves the link element the signal is emitted
with empty parameters.</p>
<p><b>See also</b> <a href="qwebpage.html#linkClicked">linkClicked</a>().</p>


<h3 class="fn"><a name="loadFinished" />void loadFinished (bool)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the page finishes loading content.
This signal is independant of script execution or page rendering.
<i>ok</i> will indicate whether the load was successful or any
error occurred.</p>
<p><b>See also</b> <a href="qwebpage.html#loadStarted">loadStarted</a>() and <a href="qwebpage.html#Extension-enum">ErrorPageExtension</a>.</p>


<h3 class="fn"><a name="loadProgress" />void loadProgress (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the global progress status changes.
The current value is provided by <i>progress</i> and scales from 0
to 100, which is the default range of <a href="qprogressbar.html">QProgressBar</a>. It accumulates changes from
all the child frames.</p>
<p><b>See also</b> <a href="qwebpage.html#bytesReceived">bytesReceived</a>().</p>


<h3 class="fn"><a name="loadStarted" />void loadStarted ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when a page starts loading content.</p>
<p><b>See also</b> <a href="qwebpage.html#loadFinished">loadFinished</a>().</p>


<h3 class="fn"><a name="menuBarVisibilityChangeRequested" />void menuBarVisibilityChangeRequested (bool)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the visibility of the menubar in
a web browser window that hosts <a href="qwebpage.html">QWebPage</a> should be changed to
<i>visible</i>.</p>


<h3 class="fn"><a name="microFocusChanged" />void microFocusChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when for example the position of the
cursor in an editable form element changes. It is used to inform
input methods about the new on-screen position where the user is
able to enter text. This signal is usually connected to the
<a href="qwidget.html#updateMicroFocus">QWidget.updateMicroFocus</a>()
slot.</p>


<h3 class="fn"><a name="printRequested" />void printRequested (QWebFrame *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the page requests the web
browser to print <i>frame</i>, for example through the JavaScript
<tt>window.print()</tt> call.</p>
<p><b>See also</b> <a href="qwebframe.html#print">QWebFrame.print</a>() and <a href="qprintpreviewdialog.html">QPrintPreviewDialog</a>.</p>


<h3 class="fn"><a name="repaintRequested" />void repaintRequested (const QRect&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever this <a href="qwebpage.html">QWebPage</a> should be updated. It's useful when
rendering a <a href="qwebpage.html">QWebPage</a> without a <a href="qwebview.html">QWebView</a> or <a href="qgraphicswebview.html">QGraphicsWebView</a>. <i>dirtyRect</i>
contains the area that needs to be updated. To paint the <a href="qwebpage.html">QWebPage</a> get the <a href="qwebpage.html#mainFrame">mainFrame</a>() and call the
render(<a href="qpainter.html">QPainter</a>*, const <a href="qregion.html">QRegion</a>&amp;) method with the <i>dirtyRect</i>
as the second parameter.</p>
<p><b>See also</b> <a href="qwebpage.html#mainFrame">mainFrame</a>() and <a href="qwebpage.html#view">view</a>().</p>


<h3 class="fn"><a name="restoreFrameStateRequested" />void restoreFrameStateRequested (QWebFrame *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the load of <i>frame</i> is finished
and the application may now update its state accordingly.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="saveFrameStateRequested" />void saveFrameStateRequested (QWebFrame *,QWebHistoryItem *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted shortly before the history of navigated
pages in <i>frame</i> is changed, for example when navigating back
in the history.</p>
<p>The provided <a href="qwebhistoryitem.html">QWebHistoryItem</a>,
<i>item</i>, holds the history entry of the frame before the
change.</p>
<p>A potential use-case for this signal is to store custom data in
the <a href="qwebhistoryitem.html">QWebHistoryItem</a> associated
to the frame, using <a href="qwebhistoryitem.html#setUserData">QWebHistoryItem.setUserData</a>().</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="scrollRequested" />void scrollRequested (int,int,const QRect&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the content given by
<i>rectToScroll</i> needs to be scrolled <i>dx</i> and <i>dy</i>
downwards and no view was set.</p>
<p><b>See also</b> <a href="qwebpage.html#view">view</a>().</p>


<h3 class="fn"><a name="selectionChanged" />void selectionChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the selection changes, either
interactively or programmatically (e.g. by calling <a href="qwebpage.html#triggerAction">triggerAction</a>() with a selection
action).</p>
<p><b>See also</b> <a href="qwebpage.html#selectedText-prop">selectedText</a>().</p>


<h3 class="fn"><a name="statusBarMessage" />void statusBarMessage (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the statusbar <i>text</i> is changed
by the page.</p>


<h3 class="fn"><a name="statusBarVisibilityChangeRequested" />void statusBarVisibilityChangeRequested (bool)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the visibility of the statusbar
in a web browser window that hosts <a href="qwebpage.html">QWebPage</a> should be changed to
<i>visible</i>.</p>


<h3 class="fn"><a name="toolBarVisibilityChangeRequested" />void toolBarVisibilityChangeRequested (bool)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the visibility of the toolbar in
a web browser window that hosts <a href="qwebpage.html">QWebPage</a> should be changed to
<i>visible</i>.</p>


<h3 class="fn"><a name="unsupportedContent" />void unsupportedContent (QNetworkReply *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when <a href="qwebpage.html#ErrorDomain-enum">WebKit</a> cannot handle a link
the user navigated to or a web server's response includes a
"Content-Disposition" header with the 'attachment' directive. If
"Content-Disposition" is present in <i>reply</i>, the web server is
indicating that the client should prompt the user to save the
content regardless of content-type. See RFC 2616 sections 19.5.1
for details about Content-Disposition.</p>
<p>At signal emission time the meta-data of the <a href="qnetworkreply.html">QNetworkReply</a> <i>reply</i> is
available.</p>
<p><b>Note:</b> The receiving slot is responsible for deleting the
<a href="qnetworkreply.html">QNetworkReply</a> <i>reply</i>.</p>
<p><b>Note:</b> This signal is only emitted if the <a href="qwebpage.html#forwardUnsupportedContent-prop">forwardUnsupportedContent</a>
property is set to true.</p>
<p><b>See also</b> <a href="qwebpage.html#downloadRequested">downloadRequested</a>().</p>


<h3 class="fn"><a name="viewportChangeRequested" />void viewportChangeRequested ()</h3><p>This is the default overload of this signal.</p><p>Page authors can provide the supplied values by using the
viewport meta tag. More information about this can be found at
<a href="http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html">
Safari Reference Library: Using the Viewport Meta Tag</a>.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also</b> <a href="qwebpage-viewportattributes.html">QWebPage.ViewportAttributes</a>,
<a href="qwebpage.html#preferredContentsSize-prop">setPreferredContentsSize</a>(),
and <a href="qgraphicsitem.html#setScale">QGraphicsWebView.setScale</a>().</p>


<h3 class="fn"><a name="windowCloseRequested" />void windowCloseRequested ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the page requests the web
browser window to be closed, for example through the JavaScript
<tt>window.close()</tt> call.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>