Answer the question
In order to leave comments, you need to log in
How to insert image on button click in PyQt5?
How to import an image after clicking on a button? I tried doing
def image(self):
self.lbl = QtWidgets.QLabel(self)
self.pix = QtGui.QPixmap("image/Rock.png")
print(self.pix.isNull())
self.lbl.setPixmap(self.pix)
self.lbl.resize(400, 400)
self.lbl.move(30, 1150)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question