Finding bounding box of a single character in QTextEdit of QT 3.1

by Jarno Elonen, 2003-06-20

The following C++ function finds the location and size (bounding box) of given character in given paragraph of a component derived from QT 3.1's QTextEdit, taking word wrapping into account. It could also pretty easily be modified to work on an QTextEdit pointer (i.e. without subclassing).

The code is hereby released into the Public Domain.

Back to mics tips