Please nominate your Qt Champions for 2021!

Change pixmap image with another image

  • i want to change pixmap image with another image, iam newbie in python

    def detect1(self):
       image_path = "test/"+str(self.file_name[self.image_index])
       image = cv2.imread(image_path)
    def crr (self):
            if self.index%60==17:
            if self.index%60==18: 

    in my plan, pixmap display image ('img25).jpg') that index 17, pixmap image should be display ('crr_img25.jpg'). I tried my code when running until def crr , suddenly the main window closes. how to solve it? is my code wrong?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you get any error message ?

  • @SGaist no message, just python shell is written 'restart'

  • Lifetime Qt Champion

    Can you provide a minimal runnable script that shows that behaviour ?

Log in to reply