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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to