[Qt-qml] Using Text element

Thomas PABST thomas.pabst at gmail.com
Wed Nov 17 10:49:48 CET 2010


Hi,

I'm looking for a way to limit the size of a Text element whatever the
length of this text. For now, if a text is bigger than the size of his
contain, we can seen it outside of the area defined. Does qml provided a way
to solve this ?

import Qt 4.7
>
> Rectangle{
>   height: 100;
>   width: 300;
>   color: "green";
>
>   Rectangle{
>     height: 50;
>     width: 100;
>     color: "red";
>     x: 50;
>     y: 30;
>        Text{
>      text: "Hello world !";
>          anchors.horizontalCenter: parent.horizontalCenter;
>      color: "white";
>      font.pointSize: 20;
>      font.family: "DejaVuSans";
>      smooth: true;
>
>        }
>   }
> }
>

Thanks

-----------------------------------------------------
Thomas PABST
thomas.pabst at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101117/65750a4a/attachment.html 


More information about the Qt-qml mailing list