PDA

View Full Version : "QPainter::setCompositionMode: Blend modes not supported on device"



ehamberg
3rd July 2008, 11:23
Hello,

I want to paint a rectangle which inverts the colours of the area it is painted over, but i get this error: "QPainter::setCompositionMode: Blend modes not supported on device."
I'm painting on a "regular" QWidget. is it possible to make a QWidget support this, and if so, how?

Serenius
15th January 2009, 05:04
I am having the same problem. I am trying to port an app that I wrote for Qt3.
I have three pixmaps that I added (with the use of setRasterOp (Qt::OrRop) ) together.
RasterOps have been removed in Qt4, setComposition mode throws the error you mention. Setting a mask on the second QPixmap does not work either. I am still looking for a solution...

Serenius
26th January 2009, 23:03
Alright, my problem is I used Qt::black instead of Qt::color0 and so was overwriting the previous contents on my master Pixmap. You should be able to do what you need to do using setCompositionMode and masked QPixmaps.