Unsolved How to set icon on Qlabel in pyside2
-
Hello
I try to display an icon on the label please provide some solution ho to show below my code how I trying to display.
self.lableImg = self.embeddedAppUpdate.findChild(QLabel, "lbl_img")
self.lableImg.setPixmap(QPixmap("icon/exit.png"))
self.lableImg.setMask(QPixmap("icon/exit.png").mask())
self.lableImg.show() -
Hi
There is nothing more to it than setPixmap.
If nothing shows its most likely due to path.
you are using icon/exit.png
try with full path and see.and then maybe consider using a QRessouce file to hold the png's
https://doc.qt.io/qtforpython/overviews/resources.html