[Qt-interest] View UTF-8 text by QGraphicsTextItem

M. Bashir Al-Noimi mbnoimi at gmx.com
Sun Mar 7 15:26:09 CET 2010


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);

snippet picture

Error picture

-- 
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/b1eebd96/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2010-03-07_162229.png
Type: image/png
Size: 4171 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100307/b1eebd96/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2010-03-07_162312.png
Type: image/png
Size: 7400 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100307/b1eebd96/attachment-0001.png 


More information about the Qt-interest-old mailing list