diff options
author | Venu <venugopal.shivashankar@digia.com> | 2013-05-02 15:58:56 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-10 16:58:24 +0200 |
commit | 0f38fe972eb20a26e9e5c67444c5be75ac6753ed (patch) | |
tree | f6d56f02983ec7a8ece9454cdee67b602abbf680 /src | |
parent | 5e1bdf1ee838992180427b7d3dc1283aae8a3673 (diff) |
Doc: Updated the addtional information about elide marks
Added the same information for QFontMetricsF::elidedText.
Task-number: QTBUG-30865
Change-Id: I57791de21f5721d7a505c3d13f450e5ec6cd2730
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfontmetrics.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index ad3d2bb813..160d66c96c 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -858,11 +858,11 @@ QRect QFontMetrics::tightBoundingRect(const QString &text) const The \a flags argument is optional and currently only supports Qt::TextShowMnemonic as value. - The elide mark will follow the \l{Qt::LayoutDirection}{layout - direction}; it will be on the right side of the text for - right-to-left layouts, and on the left side for right-to-left - layouts. Note that this behavior is independent of the text - language. + The elide mark follows the \l{Qt::LayoutDirection}{layoutdirection}. + For example, it will be on the right side of the text for right-to-left + layouts if the \a mode is \c{Qt::ElideLeft}, and on the left side of the + text if the \a mode is \c{Qt::ElideRight}. + */ QString QFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags) const { @@ -1643,13 +1643,18 @@ QRectF QFontMetricsF::tightBoundingRect(const QString &text) const Otherwise, returns the original string. The \a mode parameter specifies whether the text is elided on the - left (e.g., "...tech"), in the middle (e.g., "Tr...ch"), or on - the right (e.g., "Trol..."). + left (for example, "...tech"), in the middle (for example, "Tr...ch"), or + on the right (for example, "Trol..."). The \a width is specified in pixels, not characters. The \a flags argument is optional and currently only supports Qt::TextShowMnemonic as value. + + The elide mark follows the \l{Qt::LayoutDirection}{layoutdirection}. + For example, it will be on the right side of the text for right-to-left + layouts if the \a mode is \c{Qt::ElideLeft}, and on the left side of the + text if the \a mode is \c{Qt::ElideRight}. */ QString QFontMetricsF::elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags) const { |