lsvichet
23rd May 2011, 11:34
Hi all,
I have a problem displaying Khmer Unicode Character on QTextEdit. While other Khmer Unicode Character shown correctly in QTextEdit, this special case as shown in the figure below, did not show as expected. The same text in Ms Word show correctly what it is expected.
I typed the text directly into QTextEdit field.
http://dahlina.com/wordpress/wp-content/uploads/2011/05/unicode-qt.jpg
Here is my code:
#include <QApplication>
#include <QTextEdit>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QTextEdit txt;
QFont font;
font.setPointSize(18);
txt.setFont(font);
txt.show();
return app.exec();
}
Thanks for any kind reply.
I have a problem displaying Khmer Unicode Character on QTextEdit. While other Khmer Unicode Character shown correctly in QTextEdit, this special case as shown in the figure below, did not show as expected. The same text in Ms Word show correctly what it is expected.
I typed the text directly into QTextEdit field.
http://dahlina.com/wordpress/wp-content/uploads/2011/05/unicode-qt.jpg
Here is my code:
#include <QApplication>
#include <QTextEdit>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QTextEdit txt;
QFont font;
font.setPointSize(18);
txt.setFont(font);
txt.show();
return app.exec();
}
Thanks for any kind reply.