Hi!!

 Please add some function into:
 hbqt_qtextcodec.cpp
/* --------------------- */
HB_FUNC( QT_QTEXTCODEC_CODECFORNAME )
{
   hb_retptr( (QTextCodec *) hbqt_par_QTextCodec( 1 )->codecForName( (const 
char *)hb_parcx(2) ));
}
HB_FUNC( QT_QTEXTCODEC_SETCODECFORCSTRINGS )
{
   hbqt_par_QTextCodec( 1 )->setCodecForCStrings( (QTextCodec *) hb_parptr(2) );
   hb_ret();
}
/* --------------------- */

TQTextCodec.prg
/* --------------------- */
   METHOD  codecForName( cStr )                INLINE  
Qt_QTextCodec_codecForName( ::pPtr, cStr )
   METHOD  setCodecForCStrings( pPtr )         INLINE  
Qt_QTextCodec_setCodecForCStrings( ::pPtr, pPtr )
/* --------------------- */

I'm come from TAIWAN and use Chinese,
I need these funtion to show Chinese.

demo.prg
/* -------------- */
Func    Main()
Local   cStr1 := "Hello 中文測試",;
        oQTC  := NIL
        //
        oQTC := QTextCodec():New()
        oQTC:setCodecForCStrings( oQTC:codecForName( "Big5-ETen" ))
        //
        oQL := QLabel():New()
        oQL:setText( '<center><h1>Qt4 中文 測試!!</h1></center>' )
        oQL:setWindowTitle( '測試 e' )
        oQL:resize( 200, 50 )
        oQL:show()
        //
        MsgInfo( cStr1 )
        //
Return  NIL

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to