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|
|376365,13||Fix inconsistencies between advanceWidth and bounding rects||dev||qt/qtbase||Status: MERGED||+2||0|
|376616,3||Add QFontMetricsF methods taking text options into account||dev||qt/qtbase||Status: MERGED||+2||0|
|376617,5||Calculate text metrics using design metrics||dev||qt/qtdeclarative||Status: MERGED||+2||0|