[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Setting image as background in QListView
From:       Abhishek <absk82 () gmail ! com>
Date:       2010-11-27 21:40:38
Message-ID: AANLkTikXWKyg8S8T8a+n_bABnMNif7z_krGtThmFH06h () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

[Attachment #5 (text/html)]

Thanks a lot Pete!<div>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.</div><div>Thanks,</div><div>Abhishek.</div><div><br><div \
class="gmail_quote"> On Mon, Nov 22, 2010 at 10:23 AM, Hans-Peter Jansen <span \
dir="ltr">&lt;<a href="mailto:hpj@urpla.net">hpj@urpla.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <div class="im">On Monday 22 November 2010, 18:21:21 \
absk82 wrote:<br> &gt; Does anyone have any ideas about this?<br>
&gt;<br>
&gt; absk82 wrote:<br>
&gt; &gt; For some reason, my post didn&#39;t make it through for 2 days, so<br>
&gt; &gt; trying to send it through the mailing list.<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt; I have been having some trouble setting the background image in a<br>
&gt; &gt; QListView<br>
&gt; &gt; using style sheets. I tried using both jpg as well as png images as<br>
&gt; &gt; background. This is the stylesheet entry generated  by QtDesigner.<br>
&gt; &gt; &quot;QListView{\n&quot;<br>
&gt; &gt; &quot;    background-image: \
url(:/icons/images/wood_texture_png.png);\n&quot;<br> &gt; &gt; &quot;}&quot;)<br>
<br>
</div>Did you created and included the image(s) in the resource correctly.<br>
The PyQt examples have plenty of hmm, examples of using resources.<br>
<br>
Hint: try to display the image with a Qlabel..<br>
<br>
Pete<br>
<div><div></div><div class="h5">_______________________________________________<br>
PyQt mailing list    <a \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br> <a \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> \
</div></div></blockquote></div><br></div>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic