PDA

View Full Version : positionAt in QML TextEdit



CaCO3
1st September 2012, 23:56
I am trying to use the methode positionAt of the QML TextEdit object to determin the text a user clicked onto.
The TextEdit text is HTML including a table (see http://www.ruinelli.ch/wordpress/wp-content/uploads/2012/03/MiniBible_10.png for an example).

Sadly positionAt only gives me unusable values. When clicking in some areas of the text, it even gives the same char pos for a whole word.

Has anybody successfully used positionAt before?
It seems to be brocken or at least not well documented :(


To use the oposit function positionToRectangle I learned that I have to drop all non visible tags of the HTML text.
Sadly there is no note about this in the documentation nor an example...