TextMetrics.width does not always give a correct width for the given text and is sometimes too short depending on the font used. This only appears to reproduce on Windows and not with all fonts, in my case Arial and Arial Narrow showed up the issue.
|For Gerrit Dashboard: QTBUG-85936
|Fix inconsistencies between advanceWidth and bounding rects
|Add QFontMetricsF methods taking text options into account
|Calculate text metrics using design metrics