Text Qml overflow
-
wrote on 6 May 2015, 10:53 last edited by
Hello everybody
how can i make Text overflow hidden in Qml ?
-
Hello everybody
how can i make Text overflow hidden in Qml ?
@Malek_Khlif Do you mean text wrap ?
-
Hello everybody
how can i make Text overflow hidden in Qml ?
wrote on 6 May 2015, 12:04 last edited by tarod.net 5 Jun 2015, 12:05@Malek_Khlif For example, using this code, you'll see "very long" instead of the complete text.
Text { id: text_field height: 40 width: 40 text: "very long text" color: "red" clip: true }
You have to use the clip property.
-
@Malek_Khlif For example, using this code, you'll see "very long" instead of the complete text.
Text { id: text_field height: 40 width: 40 text: "very long text" color: "red" clip: true }
You have to use the clip property.
@tarod.net clipping is not always a good idea. It should be avoided wherever possible. Here is some more info.
Here elide can also be used instead. -
@tarod.net clipping is not always a good idea. It should be avoided wherever possible. Here is some more info.
Here elide can also be used instead.wrote on 6 May 2015, 12:39 last edited by@p3c0 Yeah, I know, but I think @Malek_Khlif is looking for something like clipping rather than eliding.
Anyway, I agree with you.
-
@Malek_Khlif For example, using this code, you'll see "very long" instead of the complete text.
Text { id: text_field height: 40 width: 40 text: "very long text" color: "red" clip: true }
You have to use the clip property.
wrote on 7 May 2015, 07:38 last edited by@tarod.net Thank you very much :))))) this is what i want
-
@tarod.net Thank you very much :))))) this is what i want
wrote on 7 May 2015, 08:04 last edited by tarod.net 5 Jul 2015, 08:05@Malek_Khlif Wonderful! You're welcome! :)
Oh, by the way, please mark the post as solved.
1/7