Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

QPixmap and QPainter (Qt 5)

$
0
0
So i am painting some QPixmaps in widget’s PaintEvent using QPainter, and i want to change one color on all of them to trasparent. What is the best way to do it? I am porting my program from Qt 4, and there were method setAlphaChannel, but now i really don’t know how to solve this problem. Tryed something like this landscape[0].load("gfx/landscape/mount.bmp"); landscape[0].setMask(landscape[0].createMaskFromColor(QColor(100,100,100),Qt::MaskOutColor)); But it doesn’t work.

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>