QWebHitTestResult Class Reference

[ QtWebKit module]

The QWebHitTestResult class provides information about the web page content after a hit test. 更多...

方法


详细描述

The QWebHitTestResult class provides information about the web page content after a hit test.

QWebHitTestResult is returned by QWebFrame.hitTestContent () 到 provide information about the content of the web page at the specified position.


方法文档编制

QWebHitTestResult.__init__ ( self )

Constructs a null hit test result.

QWebHitTestResult.__init__ ( self , QWebHitTestResult   other )

Constructs a hit test result from other .

QString QWebHitTestResult.alternateText ( self )

Returns the alternate text of the element. This corresponds to the HTML alt attribute.

QRect QWebHitTestResult.boundingRect ( self )

Returns the bounding rect of the element.

该函数在 Qt 4.5 引入。

QWebElement QWebHitTestResult.element ( self )

Returns the underlying DOM element as QWebElement .

该函数在 Qt 4.6 引入。

QWebElement QWebHitTestResult.enclosingBlockElement ( self )

Returns the block element that encloses the element hit.

A block element is an element that is rendered using the CSS "block" style. This includes for example text paragraphs.

该函数在 Qt 4.6 引入。

QWebFrame QWebHitTestResult.frame ( self )

Returns the frame the hit test was executed in.

QUrl QWebHitTestResult.imageUrl ( self )

Returns the url of the image.

bool QWebHitTestResult.isContentEditable ( self )

Returns true if the content is editable by the user; otherwise returns false.

bool QWebHitTestResult.isContentSelected ( self )

Returns true if the content tested is part of the selection; otherwise returns false.

bool QWebHitTestResult.isNull ( self )

Returns true if the hit test result is null; otherwise returns false.

QWebElement QWebHitTestResult.linkElement ( self )

Returns the element that represents the link.

该函数在 Qt 4.6 引入。

另请参阅 linkTargetFrame ().

QWebFrame QWebHitTestResult.linkTargetFrame ( self )

Returns the frame that will load the link if it is activated.

另请参阅 linkElement ().

QString QWebHitTestResult.linkText ( self )

Returns the text of the link.

QUrl QWebHitTestResult.linkTitle ( self )

Returns the title of the link.

QUrl QWebHitTestResult.linkUrl ( self )

Returns the url to which the link points to.

QPixmap QWebHitTestResult.pixmap ( self )

返回 QPixmap containing the image. A null pixmap is returned if the element being tested is not an image.

QPoint QWebHitTestResult.pos ( self )

Returns the position where the hit test occured.

QString QWebHitTestResult.title ( self )

Returns the title of the nearest enclosing HTML element.