2013-06-02 1 views

답변

14

목적으로 QFontMetrics를 사용할 수 있습니다. 다음은 Qt Docs의 샘플입니다.

QFont font("times", 24); 
QFontMetrics fm(font); 
int pixelsWide = fm.width("What's the width of this text?"); 
int pixelsHigh = fm.height();