[Qt-interest] QTextEdit howto append a integer ?

Diego Iastrubni diegoiast at gmail.com
Sun Feb 14 14:34:54 CET 2010


Try this:

int i = 42;
ui->textedit->append( QString::number(i) );

http://doc.trolltech.com/4.6/qstring.html#number


On Sun, Feb 14, 2010 at 3:30 PM, Aaron Lewis <aaron.lewis1989 at gmail.com>wrote:

> Hi , i'm new to QT. It's really not a good question.
>
> i have something like this.
>
> int i  = 5;
> ui->textedit->append(i);
>
> There's no burden for method append with an integer.
> So i tried to use (char* )i  , QString(i) , both of them fails.
> Any solutions ?
>
> --
> Best Regards,
> Aaron Lewis
>
> _______________________________________________
> 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/20100214/513063a5/attachment.html 


More information about the Qt-interest-old mailing list