QGLWidget::renderText bounding box
Is it possible to get the bounding box of the outpu开发者_Python百科t of QGLWidget::renderText() in logical or window coordinates? How?
You can try to use QFontMetrics::boundingRect(). Also maybe you'll need to consider how it handles the newline character (\n).
There's an overloaded QFontMetrics::boundingRect() that returns the bounding rect of the given text within a specified rectangle as well.
精彩评论