例如以下两个方法: int QFontMetrics::width( const QString & str, int len = -1 ) const int QFontMetrics::height() const