ee2ad9df70
A source of constant confusion is the QFontMetrics::width() function, which does not return the bounding width of the text, but the advance width. We deprecate this and add horizontalAdvance() instead, to avoid the confusion in the future. Note that there was an internal width() overload which was only there for the purpose of supporting the Qt::TextBypassShaping flag. This flag has already been replaced by public API, so no such overload is added. Instead, we deprecate the TextBypassShaping flag as well, which makes sense, since a replacement has been made. Also note that there was a consistency problem with QFontMetrics and QFontMetricsF, which are supposed to be interchangeable. The QFontMetrics::width() functions for strings took an optional int length argument, while the floating point version did not. This error is corrected in the advance() functions. [ChangeLog][QtGui][Text] Added QFontMetrics::horizontalAdvance() and QFontMetricsF::horizontalAdvance() to replace the confusingly named width() function. The latter has now been deprecated. Change-Id: I0dfda43aa65c8235be32c62fade82cae05b29c79 Reviewed-by: Lars Knoll <lars.knoll@qt.io> |
||
---|---|---|
.. | ||
qabstracttextdocumentlayout | ||
qcssparser | ||
qfont | ||
qfontcache | ||
qfontdatabase | ||
qfontmetrics | ||
qglyphrun | ||
qinputcontrol | ||
qrawfont | ||
qstatictext | ||
qsyntaxhighlighter | ||
qtextblock | ||
qtextcursor | ||
qtextdocument | ||
qtextdocumentfragment | ||
qtextdocumentlayout | ||
qtextformat | ||
qtextlayout | ||
qtextlist | ||
qtextobject | ||
qtextodfwriter | ||
qtextpiecetable | ||
qtextscriptengine | ||
qtexttable | ||
qzip | ||
text.pro |