[webkit-qt] How to get geometry of text using QWebElement

Benjamin Poulain benjamin.poulain at nokia.com
Fri Nov 12 12:05:22 PST 2010

On 11/12/2010 08:56 PM, ext Tarandeep Singh wrote:
> I want to get geometry of text (top, left coordinates, bounding box etc)
> of an html page.
> The QWebElement class let me traverse the dom and I can get geometry of
> each element, but it does not represent text as an element.
> Can anyone please tell me how to do this.

You cannot.

Text geometry cannot be expressed by the DOM. For example, take a text 
with a floating element next do it. The text as seen as one element in 
the DOM is spitted visually.


More information about the webkit-qt mailing list