开发者

QGLWidget::renderText bounding box

开发者 https://www.devze.com 2023-01-07 03:40 出处:网络
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\'

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消