[Qt4-preview-feedback] regression in input field with not latin layout

Thiago Macieira thiago.macieira at trolltech.com
Sun Feb 1 17:37:33 CET 2009


Em Domingo 01 Fevereiro 2009, às 12:08:18, Rion escreveu:
> 2) in main.cpp add next lines:
>
> QTextCodec *codec = QTextCodec::codecForLocale();
>
> if (codec) {
>
>      codec->toUnicode("hello", 5);
>
> }

Make sure there's a:

	QCoreApplication app(argc, argv);

in the beginning of that main function. If there isn't, then Qt will not 
initialise its internals. The most problematic non-initialisation is the 
"System" codec (i.e., the codec returned by QTextCodec::codecForLocale()), 
since it depends on the C library's iconv subsystem on Unix platforms.

Also note that Qt is not supported without an application object. You may get 
it to work, but without one we can't accept bug reports or guarantee it will 
remain working in the future.

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
     Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090201/49417fe7/attachment.bin 


More information about the Qt4-feedback mailing list