[PyQt] Setting image as background in QListView

Abhishek absk82 at gmail.com
Sat Nov 27 21:40:38 GMT 2010


Thanks a lot Pete!
I got to try it today and the images were indeed not getting added properly
to the resource file, because I was not running pyrcc4 utility.
Thanks,
Abhishek.

On Mon, Nov 22, 2010 at 10:23 AM, Hans-Peter Jansen <hpj at urpla.net> wrote:

> On Monday 22 November 2010, 18:21:21 absk82 wrote:
> > Does anyone have any ideas about this?
> >
> > absk82 wrote:
> > > For some reason, my post didn't make it through for 2 days, so
> > > trying to send it through the mailing list.
> > >
> > > Hi,
> > > I have been having some trouble setting the background image in a
> > > QListView
> > > using style sheets. I tried using both jpg as well as png images as
> > > background. This is the stylesheet entry generated  by QtDesigner.
> > > "QListView{\n"
> > > "    background-image: url(:/icons/images/wood_texture_png.png);\n"
> > > "}")
>
> Did you created and included the image(s) in the resource correctly.
> The PyQt examples have plenty of hmm, examples of using resources.
>
> Hint: try to display the image with a Qlabel..
>
> Pete
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101127/43cc54dc/attachment.html>


More information about the PyQt mailing list