Link to home
Create AccountLog in
Avatar of dadadude
dadadude

asked on

Refresh QIcon on QpushButton Pyqt4

How can i refresh Qpushbuttons in pyqt4 each time that i load new images.
ASKER CERTIFIED SOLUTION
Avatar of Valeri
Valeri
Flag of Bulgaria image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of dadadude
dadadude

ASKER

i already did that, and it's not working.


for i = 0; i < 10;i++{
im= listOfimage[i]
pixmap = QPixmap.fromImage(ImageQt.ImageQt(toimage(im)))
self.listOflabels[i,j].setIcon(QIcon(pixmap))
self.listOflabels[i,j].setIconSize(QSize(130,130))
}

Open in new window

not bad