Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.7.2, 5.0.0
-
None
Description
Eliding is only applied for plain text. Once AutoText changes to anything other than PlainText - or if any other values than PlainText is set, eliding is ignored.
This was documented to be a limitation in 736a73ac, however it's not apparent from the documentation how to achieve eliding with RichText which is a requirement in many cases.
import QtQuick 1.0 Rectangle { width: 132; height: 132 Column { anchors.fill: parent Text { id: workingText width: parent.width text: "THIS IS TEST----------------------------------------------------" elide: Text.ElideRight font.pixelSize: 22 } Text { width: parent.width text: "workingText is " + workingText.width +"px wide" } // This doesn't work: Text { id: brokenText width: parent.width text: "<b>"+workingText.text+"</b>" elide: Text.ElideRight textFormat: Text.PlainText font.pixelSize: 22 } Text { width: parent.width text: "brokenText is " + brokenText.width +"px wide" } } }
Attachments
Issue Links
- relates to
-
QTBUG-17299 Add support for custom highlight of ranges in textedit and textinput similar to QTextEdit::ExtraSelection
- Closed
- resulted in
-
QTBUG-17207 Add eliding support to QTextDocument to enable rich text formatted text controls to also elide
- Reported