[Qt-interest] View UTF-8 text by QGraphicsTextItem
M. Bashir Al-Noimi
mbnoimi at gmx.com
Sun Mar 7 18:45:08 CET 2010
Hi All,
Oh my god, Qt Creator takes system encoding by default, so encoding of
the source file isn't UTF-8 (I was using kubuntu but now I'm using damn
Windows).
Thanks Thiago for remembering me, it's working now.
On 07/03/2010 05:16 م, Thiago Macieira wrote:
> Em Domingo 7. Março 2010, às 15.26.09, M. Bashir Al-Noimi escreveu:
>
>> Hi All,
>>
>> When I tried to add QGraphicsTextItem item in QGraphicsScene object I
>> got illegal characters (as shown in the following pix) although I used
>> QString::fromUtf8 function !!!
>>
>> *How I can view utf8 text in QGraphicsView?*
>>
>>
>> snippet---
>>
>> graphic_itemText =new QGraphicsTextItem(QString::fromUtf8("نص
>> عربي"));
>> scene->addItem(graphic_itemText);
>> graphic_itemText->setFont(QFont("Tahoma", 15));
>> graphic_itemText->setPos(sceneWidth-pix_factory.width()-100, 15);
>>
> Are you sure your source-code is UTF-8 encoded?
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Best Regards
Muhammad Bashir Al-Noimi
My Blog: http://mbnoimi.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100307/3d52a4aa/attachment.html
More information about the Qt-interest-old
mailing list