QGraphicsScene Composition modes
-
wrote on 14 Jan 2025, 20:16 last edited by
I want to paint a black rect all over the graphicsscene, add some white holes and set the composition mode in that way that the more white a array is the more transparent it gets, showing the contents below. Whats the best way to do this?
I tried qpainter in draw foreground with multiply on my graphicsscene, but this won't show the items below. Adding a new qgraphicsitem and doing this in its paint statement hasn't worked neither. Am i missing some flags or something?
Appreciate any hints. :)
-
I want to paint a black rect all over the graphicsscene, add some white holes and set the composition mode in that way that the more white a array is the more transparent it gets, showing the contents below. Whats the best way to do this?
I tried qpainter in draw foreground with multiply on my graphicsscene, but this won't show the items below. Adding a new qgraphicsitem and doing this in its paint statement hasn't worked neither. Am i missing some flags or something?
Appreciate any hints. :)
wrote on 15 Jan 2025, 11:04 last edited by Pl45m4Have you already tried the Composition Mode Example or the Image Composition Example?
Am i missing some flags or something
QPainter::CompositionMode
?! -
Have you already tried the Composition Mode Example or the Image Composition Example?
Am i missing some flags or something
QPainter::CompositionMode
?!wrote on 15 Jan 2025, 15:42 last edited by@Pl45m4 Yeah forgot to set opacity to something else than 1, that solved it...
-
1/3