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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -