[PyQt] Re: About setting a pixmap as background

Gustavo A. Díaz gustavo.diaz at gmail.com
Fri Aug 3 14:42:52 BST 2007

Ok, thanks David, that was my doubt :)


2007/8/3, David Boddie <david at boddie.org.uk>:
> On Fri Aug 3 14:26:38 BST 2007, Gustavo A. Díaz wrote:
> > By the way David, anywhere i use SVG images i must render it first?
> > And i think yes, cause when i use directly a SVG image that contain
> shadows
> > or transparency, does not look good.
> In places where you can only use pixmaps, you will need to render the SVG
> to
> an image first. There are places where you can load an SVG and not worry
> about that - when you use QIcon for icons, for example.
> > Which are the steps to render? i must load the SVG image with
> QSvgRenderer
> > and then reder with it too?
> One nice way of doing this is to use QIcon, though QSvgRenderer might be
> better in certain situations. Creating a pixmap from an icon that contains
> an SVG drawing is quite simple:
>   icon = QIcon(path_to_svg_file)
>   pixmap = icon.pixmap(width, height)
> The good thing about this is that you only need to load the SVG drawing
> once.
> Of course, if you just want to display an SVG drawing, you can use
> QSvgWidget
> instead.
> David
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Gustavo A. Díaz
GDNet Projects
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070803/bf4cb72f/attachment.html

More information about the PyQt mailing list