Replaced with `QFontMetrics( font ).boundingRect( QString ).width() as suggested in Qt5 docs. The replacement should work for all Qt5 versions as it was available in Qt4 too.