Hello,

On Tue, Oct 08, 2013 at 04:53:04PM +0800, yuqing wang wrote:
> I am writing a qt application and i want to display chinese as the caption
> of a dialog.

I did not try it on Genode, but the attached source code should work
on Qt4 and Qt5. It may be, that we are missing, for example, font
support. So, please give it a try and report the result.

Please note, the QString::fromUtf8() is an essential part of the
solution, otherwise, it will _not_ work.

Regards
-- 
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
#include <QtGui>


int main(int argc, char **argv)
{
	QApplication app(argc, argv);

	static char const *utf8_string = "BEGIN OF TEXT | 是不存在中文支持 | END OF TEXT";

	QLabel *l(new QLabel);
	l->setText(QString::fromUtf8(utf8_string));
	l->show();

	return app.exec();
}
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to