[Qt-qml] Text size if setting text to empty string

Mark Tucker mark.tucker at airborne.aero
Mon Mar 21 17:15:35 CET 2011


Hello,

 

You could always try using the paintedWidth property instead? Does that change to 0?

 

Mark T

 

From: qt-qml-bounces+mark.tucker=airborne.aero at qt.nokia.com [mailto:qt-qml-bounces+mark.tucker=airborne.aero at qt.nokia.com] On Behalf Of Tobias Renz
Sent: 21 March 2011 15:34
To: qt-qml at qt.nokia.com
Subject: [Qt-qml] Text size if setting text to empty string

 

Hello Everybody,

AFAIK the width and height of a qml Text element is set dependant of the text.
This works if I set the text property to a new value.

The problem is that if setting the text property to "" after setting it to another value the width stays the same as before.
It doesn't change to "0". Only if I set a new text that is not empty it will recalculate the width.

Did anybody else see this? I'm using Qt 4.7.1. Do you guys think this is intended behaviour?

Regards,
Tobias 

 

Tobias Renz                       Phone: +49 7121 86 1121
R&D Software Engineer             Fax: +49 7121 86 2525
Mühleweg 5                        E-mail: tobias.renz at jdsu.com <mailto:tobias.renz at jdsu.com> 
72800 Eningen u.A. / Germany      World Wide Web: http://www.jdsu.com <http://www.jdsu.com/> 
                                  Intranet: http://www.eni.eu.acterna.net/~ren47001 <http://www.eni.eu.acterna.net/~ren47001> 
 
JDSU Deutschland GmbH Sitz: 72800 Eningen u.A.
Registergericht Stuttgart, HRB 353758
WEEE-Reg.-Nr.: DE 53620669
Geschäftsführung: Rolf Trieflinger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110321/04ffe6bb/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4516 bytes
Desc: image001.jpg
Url : http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110321/04ffe6bb/attachment-0001.jpe 


More information about the Qt-qml mailing list