On Thu, 2012-01-05 at 10:57 +0100, Fabien Lafont wrote:
> Hello,
> 
> I'm trying to insert a picture in PyQt. I've tried
> 
> LED = QLabel.setPixmap(QPixmap("LED_ON.PNG"))
> 
> but it returns:
> 
> LED = QLabel.setPixmap(QPixmap("LED_ON.PNG"))
> TypeError: QLabel.setPixmap(QPixmap): first argument of unbound method
> must have type 'QLabel'
> 
> Any Idea?

app = QApplication([])

label = QLabel()
label.setPixmap(QPixmap("LED_ON.PNG"))
label.show()

app.exec_()

-- 
Matteo Bertozzi <th...@develer.com>
Develer S.r.l.

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

Reply via email to