i want to change pixmap image with another image,
def detect(self):
imgage_path = "test/"+str(self.file_name[self.image-index])
image = cv2.imread(image_path)
.
.
cv2.imwrite(("test/"+str(self.file_name[self_index])),image)
self.
photo_img.
setPixmap(QtGui.
QPixmap("test/"+str
(self.
file_name[self.
index])))
def crr (self):
if self.index%60==17 :
self.
photo_img.
setPixmap(QtGui.
QPixmap("test/crr_img25.jpg")) if self.index%60==18 :
self.
photo_img.
setPixmap(QtGui.
QPixmap("test/crr_img26.jpg"))
def detect(self):
imgage_path = "test/"+str(self.file_name[self.image-index])
image = cv2.imread(image_path)
.
.
cv2.imwrite(("test/"+str(self.file_name[self_index])),image)
self.photo_img.setPixmap(QtGui.QPixmap("test/"+str(self.file_name[self.index])))
def crr (self):
if self.index%60==17 :
self.photo_img.setPixmap(QtGui.QPixmap("test/crr_img25.jpg"))
if self.index%60==18 :
self.photo_img.setPixmap(QtGui.QPixmap("test/crr_img26.jpg"))
To copy to clipboard, switch view to plain text mode
in my plan, pixmap display image ('test/img25).jpg') that index 17, pixmap image should be display ('test/crr_img25).jpg'). I tried my code when running until def crr , suddenly the main window closes. how to solve it?
Bookmarks