> Hello > > The methods below are defined as > > Static Public Members. >
But, Class QObject have '::tr' method. > I am not sure will these work in real life. > But anyway these are compiled withour errors. > Probably this is the reason you are getting GPF. GPF is make by QTextCodec->toUnicode_1. > BTW this function is a Stattic Member of QObject class > and am not sure will it work or not ? > It's ok when use: oQTC := QTextCodec():New() pPtr := oQTC:codecForName( 'Big5-ETen' ) oQTC:setCodecForCStrings( pPtr ) isn' accurately when use: oQTC := QTextCodec():New() pPtr := oQTC:codecForName( 'Big5-ETen' ) oQTC:setCodecForTr( pPtr ) > Opinions about Public Static Members is required. > > HB_FUNC( QT_QOBJECT_TR ) > { > hb_retc( hbqt_par_QObject( 1 )->tr( (char *) hb_parcx(2) > ).toLatin1().data() ); > } > > Regards > Pritpal Bedi > > > (WenSheng) wrote: > > > > demo.prg > > oQTC := QTextCodec():New() > > pPtr := oQTC:codecForName( 'Big5-ETen' ) > > oQTC:setCodecForCStrings( pPtr ) > > > > oQO := QObject():New() > > > > oQL := QLabel():New() > > oQL:setText( oQO:tr( '<center><h1>Qt4 Chinese test 中文 測試 > > !!</h1></center>' )) > > oQL:setWindowTitle( '3' ) > > oQL:resize( 200, 50 ) > > oQL:show() > > > > > > > > other problem, I had try: > > // under is ok ---------------- > > oQTC := QTextCodec():New() > > pPtr := oQTC:codecForName( "Big5-ETen" ) > > oQTC:setCodecForCStrings( pPtr ) > > > > // under is fail ------------- > > oQTC := QTextCodec():New() > > pPtr := oQTC:codecForName( "Big5-ETen" ) > > oQTC:setCodecForTr( pPtr ) > > > > oQO:tr( '......' ) is show ugly code. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour