Problem:
I have a QPixmap that already has an alpha channel. I want to use QPainter to drawPixmap() a QPixmap, but I want to draw it halfway transparent. I do not want to edit the QPixmap itself, unless I can easily undo the edit... thousands of times a frame.
---------------------------------
Scenario:
Basically, I already have a QGraphicsScene with plenty of transparent QPixmaps, but I want to temporarilly draw a number of them (but not all) transparently, in response to the user's actions.
---------------------------------
Question:
Can I get QPainter to transparently draw a QPixmap?
Something like: painter->drawPixmapTransparently(x, y, pixmap, transparency
Or:
Can I temporarily adjust the alpha of an entire QPixmap image, without permanently adjusting it's alpha channel?
Something like: pixmap->setAlpha(128)
---------------------------------
I've looked through the documentation (ofcourse), but I can't seem to find what I'm looking for. Since I'm not too familiar with QT, I'm hoping I've just overlooked the feature somewhere.
Thank you in advance!
Bookmarks