Results 1 to 3 of 3

Thread: "QPainter::setCompositionMode: Blend modes not supported on device"

  1. #1
    Join Date
    May 2007
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default "QPainter::setCompositionMode: Blend modes not supported on device"

    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?

  2. #2
    Join Date
    Jan 2009
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: "QPainter::setCompositionMode: Blend modes not supported on device"

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

  3. #3
    Join Date
    Jan 2009
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: "QPainter::setCompositionMode: Blend modes not supported on device"

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.