[Qt-qml] Using Text element

Valentine v.silvansky at gmail.com
Wed Nov 17 10:53:35 CET 2010


Hi! You can use "elide" property.

17.11.2010 12:49, Thomas PABST пишет:
> 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 <mailto:thomas.pabst at gmail.com>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101117/162ccaa1/attachment.html 


More information about the Qt-qml mailing list