Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.1.1
-
None
-
I0c4aafbcc50343bb0ec8b5f335045e1048a499fd
Description
When a value other than ElideNone is specified for a Text component, it is implied that the string will be elided and effectively clipped to the explicit width of the Text object. This works correctly until you enter a width of 0 at which time Text falls back to the implicitWidth automatically. This results in a component with a width of 0, and an implicitWidth > 0, and the text is rendered with no ellipses at full length.
Text { width: 0 elide: Text.ElideRight text: "Some text that should be elided and clipped" Component.onCompleted: console.log( "Width: " + width + " implicitWidth: " + implicitWidth ) }
If you give the Text a non-zero value for width, even 0.5 the string is correctly clipped.