[Qt-interest] how to append text in label

Jesús Fernández jsfdez at gmail.com
Thu Mar 12 13:29:47 CET 2009


Hehehe, you're right :)

On Thu, Mar 12, 2009 at 1:24 PM, Arnold Krille <arnold at arnoldarts.de> wrote:

> On Thursday 12 March 2009 10:39:22 Jesús Fernández wrote:
> > label->setText(label->text().append("someText"));
> > This is the only way.
>
> No, this is not the only way, there is also:
>
> label->setText( label->text() + "someText" );
>
> and
>
> label->setText( QString( "%1 someText" ).arg( label->text() ) );
>
> and probably a million other possibilities. Note the the last version is
> (almost) l10n-ready. But actually I think that some languages might be
> different between "Text" and "Text (validated)", so when l10ning you might
> see
> some interesting effects...
>
> Have fun,
>
> Arnold
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090312/eb7b661c/attachment.html 


More information about the Qt-interest-old mailing list