Without digging up the actual calls, to get the size of text, you basically need to do something like this:
- Get or create a QPaint context for the widget.
- Get the QFontMetrics from the paint context.
- Use the BoundingRect function in the QFontMetrics to get the size of the passed-in string.
Bookmarks