qt - Why the QFontMetrics::boundingRect() return a wrong size rect? -
i'm using qt4.7. when use qfontmetrics render text in situation, got wrong width. code this:
qfontmetrics fm(qapplication::font()); qrect rc = fm.boundingrect(str);
i found fm.boundingrect(str) return fixed rect while dpi changed.
Comments
Post a Comment