[PyQt] Set a SVG image as background and with transparency

Gustavo A. Díaz gustavo.diaz at gmail.com
Mon Aug 6 15:17:18 BST 2007


Hi Guys!

I tried to render a svg file and load as background, which i didn't
succeed... i just threated it as a pixmaps to load it, but with that i cant
set transparency ,if i am not wrong.

For example, i have a label which is the same size of my application and is
where i put the image as background having this result:

http://opencoffee.lnxteam.org/downloads/pub/pics/OpenCoffee_Server.png (is
the mainWidget background, the bluish one)

Now, i want to know how to load that image but rendering as a SVG file
should be threated in that background. What i temporary did is:

self.mainWindowPixmap = QtGui.QPixmap (
":/Pixmaps/pixmaps/oc_mainWindowBg.svg")
self.mainWindowBg.setPixmap(self.mainWindowPixmap)

(mainWindowBg is the QLabel)

Which i know is not the correct way to threat a SVG image.

I have two doubts here, one is i want to set transparency a SVG image,
render and set it in that QLabel
The other, is how do i set transparency for the window of that app using
that SVG image? (which should have transparency if i am not wrong)

Thanks!!!

PS: i know David, i read those links about transparency... but i have those
doubts and i have no clear how to render a svg file and load/set inside a
QLabel

-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070806/222e88da/attachment.html


More information about the PyQt mailing list