[PyQt] Texturing using PyQt/PySide

Vincent Vande Vyvre vincent.vandevyvre at swing.be
Sun Feb 3 12:07:22 GMT 2013


Le 03/02/13 11:20, the lily a écrit :
>
> thanks but I do not wanna show the image on button I wanna show it on
> a window 
>
> ------------------------------------------------------------------------
> From: niceguysan at gmail.com
> Date: Sun, 3 Feb 2013 15:35:56 +0530
> Subject: Re: [PyQt] Texturing using PyQt/PySide
> To: the.1.lily at hotmail.com
> CC: pyqt at riverbankcomputing.com
>
> Do you mean Image ? if so , you can display an image like this
>
> /self.btn1 = QtGui.QPushButton("")
> img_mIcon = QtGui.QPixmap(":images/icon_maya-small.png")
> self.btn1.setIcon(QtGui.QIcon(img_mIcon))/
>
>
> On Sun, Feb 3, 2013 at 3:26 PM, the lily <the.1.lily at hotmail.com
> <mailto:the.1.lily at hotmail.com>> wrote:
>
>     Hi
>
>     I'm new to pyside/pyqt 
>     I would like to apply a texture and displays it into a window
>     using one of them
>     I found only one example that is listed in the Qt website but it
>     is complicated since I got lost between the different functions
>
>     I just want to know if I have an image called A for example how
>     can I display it as a texture in a pyqt window 
>
>
>     thanks 
>
Ok, but your image needs a support.

Have a look here: http://www.diotavelli.net/PyQtWiki/SampleCode
There's some examples in the section 'Painting'
--
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>


More information about the PyQt mailing list