PDA

View Full Version : Graphics overlay over main window?



Nfrancisj
23rd December 2017, 02:22
Seasons Greetings!

I'm trying to overlay some animated graphics effects over my main window. I have a chat application...nothing fancy, and I would like to overlay Rain animation, Snow, or maybe Clouds when the user sends a emoticon.

First question: where do I start ? Im thinking transparent pixmap in a... frame? qlabel? better way? How do I make it so the layer is above all else.

Second question: I'd like this overlay to be outside the frame. So, play an animated cloud sequence floating across the window, from left to right, starting say...20-30 pixel outside the frame, then drifting in, and then out the other side. I was thinking.. create a large window, borderless/frameless, transparent, and then adding my chat centered in that. Better way?

Thanks in Advance.

d_stranz
23rd December 2017, 19:24
You could probably accomplish this with the Graphics Item / View architecture. Embed your chat widget into a QGraphicsWidgetItem, and use semi-transparent custom QGraphicsItems as your effects. Use the Z value to control who is on top.

Nfrancisj
25th December 2017, 23:26
Awesome thanks! I'll check it out