[PyQt] Qt Designer et Qpixmap
Bonjour a tous ..
Voila je suis en train de dévelloper une interface avec Qt en python, j'ai un souci :
Jutilise le QFilesdialog afin de chercher le chemin d'une photo a afficher.
Code:
photo =QFileDialog.getOpenFileName()
Jusqu'ici tout va bien ,j'tulisie la focntion show() pour tester si j'affiche bien la photo desiéré.
Mes ennuis debutes lorque jai introduit un pixmaplabel dans l'interface afin dafficher ma photo dans mon interface ....ou FORM1 est la fenetre principale
Code:
1 2 3 4 5
| affiche=QPixmap("C://Python23//temp//mask_base.bmp")
Form1.Pixmaplabel1.setGeometry(QRect(60,140,291,301))
Form1.Pixmaplabel1.setScaledContents(1)
Form1.Pixmaplabel1.setPixmap(affiche) |
Et la la console python me renvoi le msg d'erreur :
Code:
AttributeError : Pixmaplabel1
MERCI Beaucoup :wink: