Sophie

Sophie

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

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>QWebFrame 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">QWebFrame Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QWebFrame class represents a frame in a web page. <a href="#details">More...</a></p>

<p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qwebframe.html#RenderLayer-enum">RenderLayer</a></b> { ContentsLayer, ScrollBarLayer, PanIconLayer, AllLayers }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a></b> (<i>self</i>, QString&#160;<i>name</i>, QObject&#160;<i>object</i>)</li><li><div class="fn" />QUrl <b><a href="qwebframe.html#baseUrl">baseUrl</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QWebFrame <b><a href="qwebframe.html#childFrames">childFrames</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qwebframe.html#contentsSize">contentsSize</a></b> (<i>self</i>)</li><li><div class="fn" />QWebElement <b><a href="qwebframe.html#documentElement">documentElement</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qwebframe.html#evaluateJavaScript">evaluateJavaScript</a></b> (<i>self</i>, QString&#160;<i>scriptSource</i>)</li><li><div class="fn" />bool <b><a href="qwebframe.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />QWebElementCollection <b><a href="qwebframe.html#findAllElements">findAllElements</a></b> (<i>self</i>, QString&#160;<i>selectorQuery</i>)</li><li><div class="fn" />QWebElement <b><a href="qwebframe.html#findFirstElement">findFirstElement</a></b> (<i>self</i>, QString&#160;<i>selectorQuery</i>)</li><li><div class="fn" />QString <b><a href="qwebframe.html#frameName">frameName</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qwebframe.html#geometry">geometry</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebframe.html#hasFocus">hasFocus</a></b> (<i>self</i>)</li><li><div class="fn" />QWebHitTestResult <b><a href="qwebframe.html#hitTestContent">hitTestContent</a></b> (<i>self</i>, QPoint&#160;<i>pos</i>)</li><li><div class="fn" />QIcon <b><a href="qwebframe.html#icon">icon</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#load">load</a></b> (<i>self</i>, QUrl&#160;<i>url</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#load-2">load</a></b> (<i>self</i>, QNetworkRequest&#160;<i>request</i>, QNetworkAccessManager.Operation&#160;<i>operation</i>&#160;=&#160;QNetworkAccessManager.GetOperation, QByteArray&#160;<i>body</i>&#160;=&#160;QByteArray())</li><li><div class="fn" />dict-of-QString-list-of-QString <b><a href="qwebframe.html#metaData">metaData</a></b> (<i>self</i>)</li><li><div class="fn" />QWebPage <b><a href="qwebframe.html#page">page</a></b> (<i>self</i>)</li><li><div class="fn" />QWebFrame <b><a href="qwebframe.html#parentFrame">parentFrame</a></b> (<i>self</i>)</li><li><div class="fn" />QPoint <b><a href="qwebframe.html#pos">pos</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#print">print</a></b> (<i>self</i>, QPrinter&#160;<i>printer</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#print">print_</a></b> (<i>self</i>, QPrinter&#160;<i>printer</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#render">render</a></b> (<i>self</i>, QPainter&#160;<i>painter</i>, QRegion&#160;<i>clip</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#render-2">render</a></b> (<i>self</i>, QPainter&#160;<i>painter</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#render-3">render</a></b> (<i>self</i>, QPainter, RenderLayer&#160;<i>layer</i>, QRegion&#160;<i>clip</i>&#160;=&#160;QRegion())</li><li><div class="fn" />QString <b><a href="qwebframe.html#renderTreeDump">renderTreeDump</a></b> (<i>self</i>)</li><li><div class="fn" />QUrl <b><a href="qwebframe.html#requestedUrl">requestedUrl</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#scroll">scroll</a></b> (<i>self</i>, int, int)</li><li><div class="fn" />QRect <b><a href="qwebframe.html#scrollBarGeometry">scrollBarGeometry</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>)</li><li><div class="fn" />int <b><a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>)</li><li><div class="fn" />int <b><a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>)</li><li><div class="fn" />Qt.ScrollBarPolicy <b><a href="qwebframe.html#scrollBarPolicy">scrollBarPolicy</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>)</li><li><div class="fn" />int <b><a href="qwebframe.html#scrollBarValue">scrollBarValue</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>)</li><li><div class="fn" />QPoint <b><a href="qwebframe.html#scrollPosition">scrollPosition</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#scrollToAnchor">scrollToAnchor</a></b> (<i>self</i>, QString&#160;<i>anchor</i>)</li><li><div class="fn" />QWebSecurityOrigin <b><a href="qwebframe.html#securityOrigin">securityOrigin</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setContent">setContent</a></b> (<i>self</i>, QByteArray&#160;<i>data</i>, QString&#160;<i>mimeType</i>&#160;=&#160;QString(), QUrl&#160;<i>baseUrl</i>&#160;=&#160;QUrl())</li><li><div class="fn" /><b><a href="qwebframe.html#setFocus">setFocus</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setHtml">setHtml</a></b> (<i>self</i>, QString&#160;<i>html</i>, QUrl&#160;<i>baseUrl</i>&#160;=&#160;QUrl())</li><li><div class="fn" /><b><a href="qwebframe.html#setScrollBarPolicy">setScrollBarPolicy</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>, Qt.ScrollBarPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setScrollBarValue">setScrollBarValue</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>, int&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setScrollPosition">setScrollPosition</a></b> (<i>self</i>, QPoint&#160;<i>pos</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setTextSizeMultiplier">setTextSizeMultiplier</a></b> (<i>self</i>, float&#160;<i>factor</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setUrl">setUrl</a></b> (<i>self</i>, QUrl&#160;<i>url</i>)</li><li><div class="fn" /><b><a href="qwebframe.html#setZoomFactor">setZoomFactor</a></b> (<i>self</i>, float&#160;<i>factor</i>)</li><li><div class="fn" />float <b><a href="qwebframe.html#textSizeMultiplier">textSizeMultiplier</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebframe.html#title">title</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebframe.html#toHtml">toHtml</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebframe.html#toPlainText">toPlainText</a></b> (<i>self</i>)</li><li><div class="fn" />QUrl <b><a href="qwebframe.html#url">url</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qwebframe.html#zoomFactor">zoomFactor</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qwebframe.html#contentsSizeChanged">contentsSizeChanged</a></b> (const QSize&amp;)</li><li><div class="fn" />void <b><a href="qwebframe.html#iconChanged">iconChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qwebframe.html#initialLayoutCompleted">initialLayoutCompleted</a></b> ()</li><li><div class="fn" />void <b><a href="qwebframe.html#javaScriptWindowObjectCleared">javaScriptWindowObjectCleared</a></b> ()</li><li><div class="fn" />void <b><a href="qwebframe.html#loadFinished">loadFinished</a></b> (bool)</li><li><div class="fn" />void <b><a href="qwebframe.html#loadStarted">loadStarted</a></b> ()</li><li><div class="fn" />void <b><a href="qwebframe.html#pageChanged">pageChanged</a></b> ()</li><li><div class="fn" />void <b><a href="qwebframe.html#titleChanged">titleChanged</a></b> (const QString&amp;)</li><li><div class="fn" />void <b><a href="qwebframe.html#urlChanged">urlChanged</a></b> (const QUrl&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWebFrame class represents a frame in a web page.</p>
<p>QWebFrame represents a frame inside a web page. Each <a href="qwebpage.html">QWebPage</a> object contains at least one frame,
the main frame, obtained using <a href="qwebpage.html#mainFrame">QWebPage.mainFrame</a>(). Additional
frames will be created for HTML <tt>&lt;frame&gt;</tt> or
<tt>&lt;iframe&gt;</tt> elements.</p>
<p>A frame can be loaded using <a href="qwebframe.html#load">load</a>() or <a href="qwebframe.html#url-prop">setUrl</a>(). Alternatively, if you have
the HTML content readily available, you can use <a href="qwebframe.html#setHtml">setHtml</a>() instead.</p>
<p>The <a href="qwebframe.html#page">page</a>() function returns a
pointer to the web page object. See <a href="qwebview.html">Elements of QWebView</a> for an explanation of how
web frames are related to a web page and web view.</p>
<p>The QWebFrame class also offers methods to retrieve both the URL
currently loaded by the frame (see <a href="qwebframe.html#url-prop">url</a>()) as well as the URL originally
requested to be loaded (see <a href="qwebframe.html#requestedUrl-prop">requestedUrl</a>()). These
methods make possible the retrieval of the URL before and after a
DNS resolution or a redirection occurs during the load process. The
<a href="qwebframe.html#requestedUrl-prop">requestedUrl</a>() also
matches to the URL added to the frame history (<a href="qwebhistory.html">QWebHistory</a>) if load is successful.</p>
<p>The title of an HTML frame can be accessed with the <a href="qwebframe.html#title-prop">title</a>() property. Additionally, a
frame may also specify an icon, which can be accessed using the
<a href="qwebframe.html#icon-prop">icon</a>() property. If the
title or the icon changes, the corresponding <a href="qwebframe.html#titleChanged">titleChanged</a>() and <a href="qwebframe.html#iconChanged">iconChanged</a>() signals will be
emitted. The <a href="qwebframe.html#zoomFactor-prop">zoomFactor</a>() property can be
used to change the overall size of the content displayed in the
frame.</p>
<p>QWebFrame objects are created and controlled by the web page.
You can connect to the web page's <a href="qwebpage.html#frameCreated">frameCreated()</a> signal to be
notified when a new frame is created.</p>
<p>There are multiple ways to programmatically examine the contents
of a frame. The <a href="qwebframe.html#hitTestContent">hitTestContent</a>() function can
be used to find elements by coordinate. For access to the
underlying DOM tree, there is <a href="qwebframe.html#documentElement">documentElement</a>(), <a href="qwebframe.html#findAllElements">findAllElements</a>() and <a href="qwebframe.html#findFirstElement">findFirstElement</a>().</p>
<p>A QWebFrame can be printed onto a <a href="qprinter.html">QPrinter</a> using the <a href="qwebframe.html#print">print_</a>() function. This function is
marked as a slot and can be conveniently connected to <a href="qprintpreviewdialog.html">QPrintPreviewDialog</a>'s <a href="qprintpreviewdialog.html#paintRequested">paintRequested()</a>
signal.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="RenderLayer-enum" />QWebFrame.RenderLayer</h3><p>This enum describes the layers available for rendering using
<a href="qwebframe.html#render">render()</a>. The layers 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>QWebFrame.ContentsLayer</tt></td>
<td class="topAlign"><tt>0x10</tt></td>
<td class="topAlign">The web content of the frame</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebFrame.ScrollBarLayer</tt></td>
<td class="topAlign"><tt>0x20</tt></td>
<td class="topAlign">The scrollbars of the frame</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebFrame.PanIconLayer</tt></td>
<td class="topAlign"><tt>0x40</tt></td>
<td class="topAlign">The icon used when panning the frame</td>
</tr>
<tr>
<td class="topAlign"><tt>QWebFrame.AllLayers</tt></td>
<td class="topAlign"><tt>0xff</tt></td>
<td class="topAlign">Includes all the above layers</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="addToJavaScriptWindowObject" />QWebFrame.addToJavaScriptWindowObject (<i>self</i>, QString&#160;<i>name</i>, <a href="qobject.html">QObject</a>&#160;<i>object</i>)</h3><p>Make <i>object</i> available under <i>name</i> from within the
frame's JavaScript context. The <i>object</i> will be inserted as a
child of the frame's window object.</p>
<p>Qt properties will be exposed as JavaScript properties and slots
as JavaScript methods. The interaction between C++ and JavaScript
is explained in the documentation of the <a href="qtwebkit-bridge.html">QtWebKit bridge</a>.</p>
<p>If you want to ensure that your <a href="qtwebkit-bridge.html#qobjects">QObjects</a> remain accessible
after loading a new URL, you should add them in a slot connected to
the <a href="qwebframe.html#javaScriptWindowObjectCleared">javaScriptWindowObjectCleared</a>()
signal.</p>
<p>If Javascript is not enabled for this page, then this method
does nothing.</p>
<p>The <i>object</i> will never be explicitly deleted by <a href="qtwebkit.html">QtWebKit</a>.</p>


<h3 class="fn"><a name="baseUrl" /><a href="qurl.html">QUrl</a> QWebFrame.baseUrl (<i>self</i>)</h3><h3 class="fn"><a name="childFrames" />list-of-QWebFrame QWebFrame.childFrames (<i>self</i>)</h3><p>Returns a list of all frames that are direct children of this
frame.</p>
<p><b>See also</b> <a href="qwebframe.html#parentFrame">parentFrame</a>().</p>


<h3 class="fn"><a name="contentsSize" /><a href="qsize.html">QSize</a> QWebFrame.contentsSize (<i>self</i>)</h3><h3 class="fn"><a name="documentElement" /><a href="qwebelement.html">QWebElement</a> QWebFrame.documentElement (<i>self</i>)</h3><p>Returns the document element of this frame.</p>
<p>The document element provides access to the entire structured
content of the frame.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="evaluateJavaScript" />QVariant QWebFrame.evaluateJavaScript (<i>self</i>, QString&#160;<i>scriptSource</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>QVariant evaluateJavaScript(const QString&amp;)</tt>.</p><p>Evaluates the JavaScript defined by <i>scriptSource</i> using
this frame as context and returns the result of the last executed
statement.</p>
<p><b>See also</b> <a href="qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a>()
and <a href="qwebframe.html#javaScriptWindowObjectCleared">javaScriptWindowObjectCleared</a>().</p>


<h3 class="fn"><a name="event" />bool QWebFrame.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="findAllElements" /><a href="qwebelementcollection.html">QWebElementCollection</a> QWebFrame.findAllElements (<i>self</i>, QString&#160;<i>selectorQuery</i>)</h3><p>Returns a new list of elements matching the given CSS selector
<i>selectorQuery</i>. If there are no matching elements, an empty
list is returned.</p>
<p><a href="http://www.w3.org/TR/REC-CSS2/selector.html#q1">Standard CSS2
selector</a> syntax is used for the query.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebelement.html#findAll">QWebElement.findAll</a>().</p>


<h3 class="fn"><a name="findFirstElement" /><a href="qwebelement.html">QWebElement</a> QWebFrame.findFirstElement (<i>self</i>, QString&#160;<i>selectorQuery</i>)</h3><p>Returns the first element in the frame's document that matches
the given CSS selector <i>selectorQuery</i>. If there is no
matching element, a null element is returned.</p>
<p><a href="http://www.w3.org/TR/REC-CSS2/selector.html#q1">Standard CSS2
selector</a> syntax is used for the query.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebelement.html#findFirst">QWebElement.findFirst</a>().</p>


<h3 class="fn"><a name="frameName" />QString QWebFrame.frameName (<i>self</i>)</h3><p>The name of this frame as defined by the parent frame.</p>


<h3 class="fn"><a name="geometry" /><a href="qrect.html">QRect</a> QWebFrame.geometry (<i>self</i>)</h3><p>Return the geometry of the frame relative to it's parent
frame.</p>


<h3 class="fn"><a name="hasFocus" />bool QWebFrame.hasFocus (<i>self</i>)</h3><h3 class="fn"><a name="hitTestContent" /><a href="qwebhittestresult.html">QWebHitTestResult</a> QWebFrame.hitTestContent (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pos</i>)</h3><p>Performs a hit test on the frame contents at the given position
<i>pos</i> and returns the hit test result.</p>


<h3 class="fn"><a name="icon" /><a href="qicon.html">QIcon</a> QWebFrame.icon (<i>self</i>)</h3><h3 class="fn"><a name="load" />QWebFrame.load (<i>self</i>, <a href="qurl.html">QUrl</a>&#160;<i>url</i>)</h3><p>Loads <i>url</i> into this frame.</p>
<p><b>Note:</b> The view remains the same until enough data has
arrived to display the new <i>url</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#url-prop">setUrl</a>(),
<a href="qwebframe.html#setHtml">setHtml</a>(), and <a href="qwebframe.html#setContent">setContent</a>().</p>


<h3 class="fn"><a name="load-2" />QWebFrame.load (<i>self</i>, <a href="qnetworkrequest.html">QNetworkRequest</a>&#160;<i>request</i>, <a href="qnetworkaccessmanager.html#Operation-enum">QNetworkAccessManager.Operation</a>&#160;<i>operation</i>&#160;=&#160;QNetworkAccessManager.GetOperation, <a href="qbytearray.html">QByteArray</a>&#160;<i>body</i>&#160;=&#160;QByteArray())</h3><p>Loads a network request, <i>req</i>, into this frame, using the
method specified in <i>operation</i>.</p>
<p><i>body</i> is optional and is only used for POST
operations.</p>
<p><b>Note:</b> The view remains the same until enough data has
arrived to display the new content.</p>
<p><b>See also</b> <a href="qwebframe.html#url-prop">setUrl</a>().</p>


<h3 class="fn"><a name="metaData" />dict-of-QString-list-of-QString QWebFrame.metaData (<i>self</i>)</h3><p>Returns the meta data in this frame as a <a href="qmultimap.html">QMultiMap</a></p>
<p>The meta data consists of the name and content attributes of the
of the <tt>&lt;meta&gt;</tt> tags in the HTML document.</p>
<p>For example:</p>
<pre class="cpp">
 <span class="operator">&lt;</span>html<span class="operator">&gt;</span>
     <span class="operator">&lt;</span>head<span class="operator">&gt;</span>
         <span class="operator">&lt;</span>meta name<span class="operator">=</span><span class="string">"description"</span> content<span class="operator">=</span><span class="string">"This document is a tutorial about Qt development"</span><span class="operator">&gt;</span>
         <span class="operator">&lt;</span>meta name<span class="operator">=</span><span class="string">"keywords"</span> content<span class="operator">=</span><span class="string">"Qt, WebKit, Programming"</span><span class="operator">&gt;</span>
     <span class="operator">&lt;</span><span class="operator">/</span>head<span class="operator">&gt;</span>
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 <span class="operator">&lt;</span><span class="operator">/</span>html<span class="operator">&gt;</span>
</pre>
<p>Given the above HTML code the metaData() function will return a
map with two entries:</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th>Key</th>
<th>Value</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td>"description"</td>
<td>"This document is a tutorial about Qt development"</td>
</tr>
<tr class="even" valign="top">
<td>"keywords"</td>
<td>"Qt, WebKit, Programming"</td>
</tr>
</table>
<p>This function returns a multi map to support multiple meta tags
with the same attribute name.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="page" /><a href="qwebpage.html">QWebPage</a> QWebFrame.page (<i>self</i>)</h3><p>The web page that contains this frame.</p>
<p><b>See also</b> <a href="qwebframe.html#pageChanged">pageChanged</a>().</p>


<h3 class="fn"><a name="parentFrame" /><a href="qwebframe.html">QWebFrame</a> QWebFrame.parentFrame (<i>self</i>)</h3><p>Returns the parent frame of this frame, or 0 if the frame is the
web pages main frame.</p>
<p>This is equivalent to qobject_cast&lt;<a href="qwebframe.html">QWebFrame</a>*&gt;(frame-&gt;<a href="qobject.html#parent">parent</a>()).</p>
<p><b>See also</b> <a href="qwebframe.html#childFrames">childFrames</a>().</p>


<h3 class="fn"><a name="pos" /><a href="qpoint.html">QPoint</a> QWebFrame.pos (<i>self</i>)</h3><p>Returns the position of the frame relative to it's parent
frame.</p>


<h3 class="fn"><a name="print" />QWebFrame.print (<i>self</i>, <a href="qprinter.html">QPrinter</a>&#160;<i>printer</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void print(QPrinter *) const</tt>.</p><p>Prints the frame to the given <i>printer</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#render">render</a>().</p>


<h3 class="fn"><a name="print" />QWebFrame.print_ (<i>self</i>, <a href="qprinter.html">QPrinter</a>&#160;<i>printer</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void print(QPrinter *) const</tt>.</p><p>Prints the frame to the given <i>printer</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#render">render</a>().</p>


<h3 class="fn"><a name="render" />QWebFrame.render (<i>self</i>, <a href="qpainter.html">QPainter</a>&#160;<i>painter</i>, <a href="qregion.html">QRegion</a>&#160;<i>clip</i>)</h3><p>Render the frame into <i>painter</i>.</p>


<h3 class="fn"><a name="render-2" />QWebFrame.render (<i>self</i>, <a href="qpainter.html">QPainter</a>&#160;<i>painter</i>)</h3><p>Render the frame into <i>painter</i> clipping to
<i>clip</i>.</p>


<h3 class="fn"><a name="render-3" />QWebFrame.render (<i>self</i>, <a href="qpainter.html">QPainter</a>, <a href="qwebframe.html#RenderLayer-enum">RenderLayer</a>&#160;<i>layer</i>, <a href="qregion.html">QRegion</a>&#160;<i>clip</i>&#160;=&#160;QRegion())</h3><p>Render the <i>layer</i> of the frame using <i>painter</i>
clipping to <i>clip</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebframe.html#print">print_</a>().</p>


<h3 class="fn"><a name="renderTreeDump" />QString QWebFrame.renderTreeDump (<i>self</i>)</h3><p>Returns a dump of the rendering tree. This is mainly useful for
debugging html.</p>


<h3 class="fn"><a name="requestedUrl" /><a href="qurl.html">QUrl</a> QWebFrame.requestedUrl (<i>self</i>)</h3><h3 class="fn"><a name="scroll" />QWebFrame.scroll (<i>self</i>, int, int)</h3><p>Scrolls the frame <i>dx</i> pixels to the right and <i>dy</i>
pixels downward. Both <i>dx</i> and <i>dy</i> may be negative.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qwebframe.html#scrollPosition-prop">QWebFrame.scrollPosition</a>.</p>


<h3 class="fn"><a name="scrollBarGeometry" /><a href="qrect.html">QRect</a> QWebFrame.scrollBarGeometry (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>)</h3><p>Returns the geometry for the scrollbar with orientation
<i>orientation</i>.</p>
<p>If the scrollbar does not exist an empty rect is returned.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="scrollBarMaximum" />int QWebFrame.scrollBarMaximum (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>)</h3><p>Returns the maximum value for the scrollbar with orientation
<i>orientation</i>, or 0 if no scrollbar is found for
<i>orientation</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a>().</p>


<h3 class="fn"><a name="scrollBarMinimum" />int QWebFrame.scrollBarMinimum (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>)</h3><p>Returns the minimum value for the scrollbar with orientation
<i>orientation</i>.</p>
<p>The minimum value is always 0.</p>
<p><b>See also</b> <a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a>().</p>


<h3 class="fn"><a name="scrollBarPolicy" /><a href="qt.html#ScrollBarPolicy-enum">Qt.ScrollBarPolicy</a> QWebFrame.scrollBarPolicy (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>)</h3><p>Returns the scrollbar policy for the scrollbar defined by
<i>orientation</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#setScrollBarPolicy">setScrollBarPolicy</a>().</p>


<h3 class="fn"><a name="scrollBarValue" />int QWebFrame.scrollBarValue (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>)</h3><p>Returns the current value for the scrollbar with orientation
<i>orientation</i>, or 0 if no scrollbar is found for
<i>orientation</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#setScrollBarValue">setScrollBarValue</a>(),
<a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a>(),
and <a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a>().</p>


<h3 class="fn"><a name="scrollPosition" /><a href="qpoint.html">QPoint</a> QWebFrame.scrollPosition (<i>self</i>)</h3><h3 class="fn"><a name="scrollToAnchor" />QWebFrame.scrollToAnchor (<i>self</i>, QString&#160;<i>anchor</i>)</h3><p>Scrolls the frame to the given <i>anchor</i> name.</p>
<p>This function was introduced in Qt 4.7.</p>


<h3 class="fn"><a name="securityOrigin" /><a href="qwebsecurityorigin.html">QWebSecurityOrigin</a> QWebFrame.securityOrigin (<i>self</i>)</h3><p>Returns the frame's security origin.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="setContent" />QWebFrame.setContent (<i>self</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>data</i>, QString&#160;<i>mimeType</i>&#160;=&#160;QString(), <a href="qurl.html">QUrl</a>&#160;<i>baseUrl</i>&#160;=&#160;QUrl())</h3><p>Sets the content of this frame to the specified content
<i>data</i>. If the <i>mimeType</i> argument is empty it is
currently assumed that the content is HTML but in future versions
we may introduce auto-detection.</p>
<p>External objects referenced in the content are located relative
to <i>baseUrl</i>.</p>
<p>The <i>data</i> is loaded immediately; external objects are
loaded asynchronously.</p>
<p><b>Note:</b> This method will not affect session or global
history for the frame.</p>
<p><b>See also</b> <a href="qwebframe.html#toHtml">toHtml</a>() and
<a href="qwebframe.html#setHtml">setHtml</a>().</p>


<h3 class="fn"><a name="setFocus" />QWebFrame.setFocus (<i>self</i>)</h3><p>Gives keyboard input focus to this frame.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebframe.html#focus-prop">hasFocus</a>().</p>


<h3 class="fn"><a name="setHtml" />QWebFrame.setHtml (<i>self</i>, QString&#160;<i>html</i>, <a href="qurl.html">QUrl</a>&#160;<i>baseUrl</i>&#160;=&#160;QUrl())</h3><p>Sets the content of this frame to <i>html</i>. <i>baseUrl</i> is
optional and used to resolve relative URLs in the document, such as
referenced images or stylesheets.</p>
<p>The <i>html</i> is loaded immediately; external objects are
loaded asynchronously.</p>
<p>If a script in the <i>html</i> runs longer than the default
script timeout (currently 10 seconds), for example due to being
blocked by a modal JavaScript alert dialog, this method will return
as soon as possible after the timeout and any subsequent
<i>html</i> will be loaded asynchronously.</p>
<p>When using this method WebKit assumes that external resources
such as JavaScript programs or style sheets are encoded in UTF-8
unless otherwise specified. For example, the encoding of an
external script can be specified through the charset attribute of
the HTML script tag. It is also possible for the encoding to be
specified by web server.</p>
<p>This is a convenience function equivalent to setContent(html,
"text/html", <a href="qwebframe.html#baseUrl-prop">baseUrl</a>).</p>
<p><b>Note:</b> This method will not affect session or global
history for the frame.</p>
<p><b>Warning:</b> This function works only for HTML, for other
mime types (i.e. XHTML, SVG) <a href="qwebframe.html#setContent">setContent</a>() should be used
instead.</p>
<p><b>See also</b> <a href="qwebframe.html#toHtml">toHtml</a>(),
<a href="qwebframe.html#setContent">setContent</a>(), and <a href="qwebframe.html#load">load</a>().</p>


<h3 class="fn"><a name="setScrollBarPolicy" />QWebFrame.setScrollBarPolicy (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>, <a href="qt.html#ScrollBarPolicy-enum">Qt.ScrollBarPolicy</a>&#160;<i>policy</i>)</h3><p>Sets the scrollbar policy for the scrollbar defined by
<i>orientation</i> to <i>policy</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#scrollBarPolicy">scrollBarPolicy</a>().</p>


<h3 class="fn"><a name="setScrollBarValue" />QWebFrame.setScrollBarValue (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>, int&#160;<i>value</i>)</h3><p>Sets the current <i>value</i> for the scrollbar with orientation
<i>orientation</i>.</p>
<p>The scrollbar forces the <i>value</i> to be within the legal
range: minimum &lt;= value &lt;= maximum.</p>
<p>Changing the value also updates the thumb position.</p>
<p><b>See also</b> <a href="qwebframe.html#scrollBarValue">scrollBarValue</a>(), <a href="qwebframe.html#scrollBarMinimum">scrollBarMinimum</a>(), and
<a href="qwebframe.html#scrollBarMaximum">scrollBarMaximum</a>().</p>


<h3 class="fn"><a name="setScrollPosition" />QWebFrame.setScrollPosition (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pos</i>)</h3><h3 class="fn"><a name="setTextSizeMultiplier" />QWebFrame.setTextSizeMultiplier (<i>self</i>, float&#160;<i>factor</i>)</h3><p>Sets the value of the multiplier used to scale the text in a Web
frame to the <i>factor</i> specified.</p>
<p><b>See also</b> <a href="qwebframe.html#textSizeMultiplier">textSizeMultiplier</a>().</p>


<h3 class="fn"><a name="setUrl" />QWebFrame.setUrl (<i>self</i>, <a href="qurl.html">QUrl</a>&#160;<i>url</i>)</h3><h3 class="fn"><a name="setZoomFactor" />QWebFrame.setZoomFactor (<i>self</i>, float&#160;<i>factor</i>)</h3><h3 class="fn"><a name="textSizeMultiplier" />float QWebFrame.textSizeMultiplier (<i>self</i>)</h3><p>Returns the value of the multiplier used to scale the text in a
Web frame.</p>
<p><b>See also</b> <a href="qwebframe.html#setTextSizeMultiplier">setTextSizeMultiplier</a>().</p>


<h3 class="fn"><a name="title" />QString QWebFrame.title (<i>self</i>)</h3><h3 class="fn"><a name="toHtml" />QString QWebFrame.toHtml (<i>self</i>)</h3><p>Returns the frame's content as HTML, enclosed in HTML and BODY
tags.</p>
<p><b>See also</b> <a href="qwebframe.html#setHtml">setHtml</a>()
and <a href="qwebframe.html#toPlainText">toPlainText</a>().</p>


<h3 class="fn"><a name="toPlainText" />QString QWebFrame.toPlainText (<i>self</i>)</h3><p>Returns the content of this frame converted to plain text,
completely stripped of all HTML formatting.</p>
<p><b>See also</b> <a href="qwebframe.html#toHtml">toHtml</a>().</p>


<h3 class="fn"><a name="url" /><a href="qurl.html">QUrl</a> QWebFrame.url (<i>self</i>)</h3><h3 class="fn"><a name="zoomFactor" />float QWebFrame.zoomFactor (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="contentsSizeChanged" />void contentsSizeChanged (const QSize&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the frame's contents size changes to
<i>size</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebframe.html#contentsSize-prop">contentsSize</a>().</p>


<h3 class="fn"><a name="iconChanged" />void iconChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the icon ("favicon") associated with
the frame has been loaded.</p>
<p><b>See also</b> <a href="qwebframe.html#icon-prop">icon</a>().</p>


<h3 class="fn"><a name="initialLayoutCompleted" />void initialLayoutCompleted ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the frame is laid out the first
time. This is the first time you will see contents displayed on the
frame.</p>
<p><b>Note:</b> A frame can be laid out multiple times.</p>


<h3 class="fn"><a name="javaScriptWindowObjectCleared" />void javaScriptWindowObjectCleared ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the global window object of the
JavaScript environment is cleared, e.g., before starting a new
load.</p>
<p>If you intend to add <a href="qtwebkit-bridge.html#qobjects">QObjects</a> to a <a href="qwebframe.html">QWebFrame</a> using <a href="qwebframe.html#addToJavaScriptWindowObject">addToJavaScriptWindowObject</a>(),
you should add them in a slot connected to this signal. This
ensures that your objects remain accessible when loading new
URLs.</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 a load of this frame is finished.
<i>ok</i> will indicate whether the load was successful or any
error occurred.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebframe.html#loadStarted">loadStarted</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 new load of this frame is
started.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also</b> <a href="qwebframe.html#loadFinished">loadFinished</a>().</p>


<h3 class="fn"><a name="pageChanged" />void pageChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when this frame has been moved to a
different <a href="qwebpage.html">QWebPage</a>.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also</b> <a href="qwebframe.html#page">page</a>().</p>


<h3 class="fn"><a name="titleChanged" />void titleChanged (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the title of the frame changes.
The <i>title</i> string specifies the new title.</p>
<p><b>See also</b> <a href="qwebframe.html#title-prop">title</a>().</p>


<h3 class="fn"><a name="urlChanged" />void urlChanged (const QUrl&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted with the URL of the frame when the
frame's title is received. The new URL is specified by
<i>url</i>.</p>
<p><b>See also</b> <a href="qwebframe.html#url-prop">url</a>().</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>