I’m making an image viewer, and i have made it shows animated images, but i can’t find the way to set the background for those that have an alpha channel. It’s easy to make it with static images, using qpainter, but i don’t know how to do it with animated images.
by the way, i’m learning both Qt and english, so please be patient :-P
Please, show you code, how you work with QMovie, and I don’t understand you need “Alpha background” as in Title or “background for images with alpha channel” as in topic body? :)
Gerolf It seems to me what I with you said about different things. As I understand samkpo has movie with alpha channel, and He want set background under this movie. You said about animate background for something with use Qmovie.
You need to subclass QLabel (or simply write a new widget from scratch) and in its paintEvent paint the background and then the current QMovie frame; or you can enable autoFillBackground and change the label’s background palette. :)
Vass wrote
Gerolf It seems to me what I with you said about different things. As I understand samkpo has movie with alpha channel, and He want set background under this movie. You said about animate background for something with use Qmovie.
But then you can just paint the background beffore drawing the move:
Or position a label or widget with the needed background exactly below the imageLabel. (so position one widget with setgeometry or make obne label a child of the other one). Or does QLabel not draw the movie with transparent background?