[Qt-interest] how to append text in label

Jesús Fernández jsfdez at gmail.com
Thu Mar 12 10:39:22 CET 2009


label->setText(label->text().append("someText"));

This is the only way.

On Thu, Mar 12, 2009 at 10:33 AM, Ankit Agarwal <ankit17.ag at gmail.com>wrote:

> QString tempText = label.text();
> tempText.append("validate")
> label.setText(tempText);
>
> I know this may not be a good solution but still....should work ;)
>
> On Thu, Mar 12, 2009 at 3:00 PM, chandrasekar wagmare <
> sekarwagmare at gmail.com> wrote:
>
>>
>> hi friends,
>> is it possible to append some text in *QLable()*
>> we are using *label->setText("someText");*
>> the *label->text()* is already having the text "*role*"
>>
>> now if user click one button say "valid" button .. i have to append the
>> text "validated" to "role" so
>> the *label->text()* will have text "*role validated*"
>> i try *label->append()* but says
>> *error: ‘class QLabel’ has no member named ‘append’*
>>
>> how can i append a text in .cpp file .. please help ...
>> --
>> CHANDRU
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
>
> --
> Regards,
> Ankit Agarwal
> SW Engineer
> Vegayan Systems
> email : ankit_agarwal at vegayan.com
> Blog : http://ankit17.wordpress.com
>
> _______________________________________________
> 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/47104c71/attachment.html 


More information about the Qt-interest-old mailing list