<?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>QWebHitTestResult 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">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QWebHitTestResult Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QWebHitTestResult class provides information about the web page content after a hit test. <a href="#details">More...</a></p> <h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwebhittestresult.html#QWebHitTestResult">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qwebhittestresult.html#QWebHitTestResult-2">__init__</a></b> (<i>self</i>, QWebHitTestResult <i>other</i>)</li><li><div class="fn" />QString <b><a href="qwebhittestresult.html#alternateText">alternateText</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qwebhittestresult.html#boundingRect">boundingRect</a></b> (<i>self</i>)</li><li><div class="fn" />QWebElement <b><a href="qwebhittestresult.html#element">element</a></b> (<i>self</i>)</li><li><div class="fn" />QWebElement <b><a href="qwebhittestresult.html#enclosingBlockElement">enclosingBlockElement</a></b> (<i>self</i>)</li><li><div class="fn" />QWebFrame <b><a href="qwebhittestresult.html#frame">frame</a></b> (<i>self</i>)</li><li><div class="fn" />QUrl <b><a href="qwebhittestresult.html#imageUrl">imageUrl</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebhittestresult.html#isContentEditable">isContentEditable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebhittestresult.html#isContentSelected">isContentSelected</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qwebhittestresult.html#isNull">isNull</a></b> (<i>self</i>)</li><li><div class="fn" />QWebElement <b><a href="qwebhittestresult.html#linkElement">linkElement</a></b> (<i>self</i>)</li><li><div class="fn" />QWebFrame <b><a href="qwebhittestresult.html#linkTargetFrame">linkTargetFrame</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebhittestresult.html#linkText">linkText</a></b> (<i>self</i>)</li><li><div class="fn" />QUrl <b><a href="qwebhittestresult.html#linkTitle">linkTitle</a></b> (<i>self</i>)</li><li><div class="fn" />QUrl <b><a href="qwebhittestresult.html#linkUrl">linkUrl</a></b> (<i>self</i>)</li><li><div class="fn" />QPixmap <b><a href="qwebhittestresult.html#pixmap">pixmap</a></b> (<i>self</i>)</li><li><div class="fn" />QPoint <b><a href="qwebhittestresult.html#pos">pos</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebhittestresult.html#title">title</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWebHitTestResult class provides information about the web page content after a hit test.</p> <p>QWebHitTestResult is returned by <a href="qwebframe.html#hitTestContent">QWebFrame.hitTestContent</a>() to provide information about the content of the web page at the specified position.</p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QWebHitTestResult" />QWebHitTestResult.__init__ (<i>self</i>)</h3><p>Constructs a null hit test result.</p> <h3 class="fn"><a name="QWebHitTestResult-2" />QWebHitTestResult.__init__ (<i>self</i>, <a href="qwebhittestresult.html">QWebHitTestResult</a> <i>other</i>)</h3><p>Constructs a hit test result from <i>other</i>.</p> <h3 class="fn"><a name="alternateText" />QString QWebHitTestResult.alternateText (<i>self</i>)</h3><p>Returns the alternate text of the element. This corresponds to the HTML alt attribute.</p> <h3 class="fn"><a name="boundingRect" /><a href="qrect.html">QRect</a> QWebHitTestResult.boundingRect (<i>self</i>)</h3><p>Returns the bounding rect of the element.</p> <p>This function was introduced in Qt 4.5.</p> <h3 class="fn"><a name="element" /><a href="qwebelement.html">QWebElement</a> QWebHitTestResult.element (<i>self</i>)</h3><p>Returns the underlying DOM element as <a href="qwebelement.html">QWebElement</a>.</p> <p>This function was introduced in Qt 4.6.</p> <h3 class="fn"><a name="enclosingBlockElement" /><a href="qwebelement.html">QWebElement</a> QWebHitTestResult.enclosingBlockElement (<i>self</i>)</h3><p>Returns the block element that encloses the element hit.</p> <p>A block element is an element that is rendered using the CSS "block" style. This includes for example text paragraphs.</p> <p>This function was introduced in Qt 4.6.</p> <h3 class="fn"><a name="frame" /><a href="qwebframe.html">QWebFrame</a> QWebHitTestResult.frame (<i>self</i>)</h3><p>Returns the frame the hit test was executed in.</p> <h3 class="fn"><a name="imageUrl" /><a href="qurl.html">QUrl</a> QWebHitTestResult.imageUrl (<i>self</i>)</h3><p>Returns the url of the image.</p> <h3 class="fn"><a name="isContentEditable" />bool QWebHitTestResult.isContentEditable (<i>self</i>)</h3><p>Returns true if the content is editable by the user; otherwise returns false.</p> <h3 class="fn"><a name="isContentSelected" />bool QWebHitTestResult.isContentSelected (<i>self</i>)</h3><p>Returns true if the content tested is part of the selection; otherwise returns false.</p> <h3 class="fn"><a name="isNull" />bool QWebHitTestResult.isNull (<i>self</i>)</h3><p>Returns true if the hit test result is null; otherwise returns false.</p> <h3 class="fn"><a name="linkElement" /><a href="qwebelement.html">QWebElement</a> QWebHitTestResult.linkElement (<i>self</i>)</h3><p>Returns the element that represents the link.</p> <p>This function was introduced in Qt 4.6.</p> <p><b>See also</b> <a href="qwebhittestresult.html#linkTargetFrame">linkTargetFrame</a>().</p> <h3 class="fn"><a name="linkTargetFrame" /><a href="qwebframe.html">QWebFrame</a> QWebHitTestResult.linkTargetFrame (<i>self</i>)</h3><p>Returns the frame that will load the link if it is activated.</p> <p><b>See also</b> <a href="qwebhittestresult.html#linkElement">linkElement</a>().</p> <h3 class="fn"><a name="linkText" />QString QWebHitTestResult.linkText (<i>self</i>)</h3><p>Returns the text of the link.</p> <h3 class="fn"><a name="linkTitle" /><a href="qurl.html">QUrl</a> QWebHitTestResult.linkTitle (<i>self</i>)</h3><p>Returns the title of the link.</p> <h3 class="fn"><a name="linkUrl" /><a href="qurl.html">QUrl</a> QWebHitTestResult.linkUrl (<i>self</i>)</h3><p>Returns the url to which the link points to.</p> <h3 class="fn"><a name="pixmap" /><a href="qpixmap.html">QPixmap</a> QWebHitTestResult.pixmap (<i>self</i>)</h3><p>Returns a <a href="qpixmap.html">QPixmap</a> containing the image. A null pixmap is returned if the element being tested is not an image.</p> <h3 class="fn"><a name="pos" /><a href="qpoint.html">QPoint</a> QWebHitTestResult.pos (<i>self</i>)</h3><p>Returns the position where the hit test occured.</p> <h3 class="fn"><a name="title" />QString QWebHitTestResult.title (<i>self</i>)</h3><p>Returns the title of the nearest enclosing HTML element.</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>