diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-05-11 10:45:51 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-08-11 17:14:52 (GMT) |
commit | c225767b9b50336432e39cd589637df4fe721d62 (patch) | |
tree | 06b98b06ba871dd18d828dc8d1be033820353246 /src/gui/text | |
parent | e0059d1d01a7c1d76ed86cccf8253d0ebd18f575 (diff) | |
download | Qt-c225767b9b50336432e39cd589637df4fe721d62.zip Qt-c225767b9b50336432e39cd589637df4fe721d62.tar.gz Qt-c225767b9b50336432e39cd589637df4fe721d62.tar.bz2 |
Add the Qt::TextLongestVariant flag so QFontMetrics::size returns the size of the biggest string
In case the strings contains multiple strings separated by \x9c
Reviewed-by: Oswald Buddenhagen
Task-number: QT-10
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontmetrics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index 012c0f6..47d3864 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -798,7 +798,7 @@ QRect QFontMetrics::boundingRect(const QRect &rect, int flags, const QString &te */ QSize QFontMetrics::size(int flags, const QString &text, int tabStops, int *tabArray) const { - return boundingRect(QRect(0,0,0,0), flags, text, tabStops, tabArray).size(); + return boundingRect(QRect(0,0,0,0), flags | Qt::TextLongestVariant, text, tabStops, tabArray).size(); } /*! |