[Qt-interest] Unable to draw QString after conversion

trinathpujari trinathpujari at tataelxsi.co.in
Sat Jan 30 14:06:07 CET 2010


Hi All,
         
          I am using QPainter with QImage to some strings in my ARM 
board.      

          QImage *image = new QImage(width,height,format);
          QPainter paint(image);
          paint. drawText(10,10,QString("Hello World"));
this code is working. But when i am using drawText(10,10,string), where 
string is of unsigned short.

For conversion from unsigned short to QString i am using the API
QString str = QString :: fromUtf16(string, length);

When i print the values after conversion it is printing properly in 
command line. But it is not drawing on to the board.
Please if anybody knows this problem please give me some suggestion and 
help me.

Thanking in Advance.

Regards
 Trinath









More information about the Qt-interest-old mailing list