От: | TheBeginner | ||
Дата: | 18.09.24 12:26 | ||
Оценка: |
QString QFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags = 0) const
f the string text is wider than width, returns an elided version of the string (i.e., a string with "..." in it). Otherwise, returns the original string.
The 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...").
The width is specified in pixels, not characters.
The elide mark follows the layoutdirection. For example, it will be on the right side of the text for right-to-left layouts if the mode is Qt::ElideLeft, and on the left side of the text if the mode is Qt::ElideRight.
OK.Note: This method no longer affects text layout direction since Qt 4.7.
От: | SаNNy | ||
Дата: | 18.09.24 12:31 | ||
Оценка: | +1 |
От: | TheBeginner | ||
Дата: | 18.09.24 13:26 | ||
Оценка: |