QCString s = "Привет";QTextCodec *codec = QTextCodec::codecForName ( "KOI8-R" );QString title = codec -> toUnicode ( s );widget -> setCaption ( title );
class RusianQString : public QString{ static QTextCodec *codec = QTextCodec::codecForName ( "KOI8-R" );public: RusianQString(char* str) : QString( codec -> toUnicode ( str ) ) { }}