[Qt-interest] QPixmap, QBitmap, How to achieve this ?

Ta-Cheng Lin tclin1998 at gmail.com
Mon Apr 4 03:00:34 CEST 2011


Hi:

 QPixmap workPix;
 QBitmap  maskBmap;

 workPix's background is 'black', and then fill with 'green' and solid
patten using QPainter.

maskBmap's some area is '1' and some is '0'.

For Qt 3.3, I can use
 workPix.setMask(makBmap)  so the result of workPix is that  overlapped with
maskBmap's '1' area is green,
'0' 's area is black.

For Qt 4.6. The above scheme does not work any more.
How can I achieve the same results in Qt 4.6?

Thanks!

-Todd





--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110403/94d6e957/attachment.html 


More information about the Qt-interest-old mailing list