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.
↧