Hello Everybody
Here is the simplest solution from HbQt's stand-point.
....
....
.....
FUNCTION GenerateQRCode( cCode )
LOCAL hZebra := hb_zebra_create_qrcode( cCode )
LOCAL oBrush := QBrush( QColor( 0, 0, 0 ) )
LOCAL oImage := QImage( QSize( 66, 66 ), QImage_Format_RGB32 )
LOCAL oPainter, oPixmap
oImage:fill( QColor( Qt_white ) )
oPainter := QPainter( oImage )
hb_zebra_draw( hZebra, {| x, y, w, h | oPainter:fillRect( Int( x + .5 ), Int( y + .5 ), Int( w + .5 ), Int( h + .5 ), oBrush ) }, 1, 1, 3, 3 )
oPixmap := QPixmap():fromImage( oImage )
RETURN oPixmap
Pritpal Bedi
a student of software analysis & concepts