def setFrame(self, pixmap=None): # First check to see if we have a valid QPixmap before attemping to update. if pixmap and not pixmap.isNull(): # Set the VideoScreen's scene's Pixmap object to the image signaled from the worker thread. self._photo.setPixmap(pixmap) # Ensure the Pixmap object is flagged as added to the scene. if self.added is False: self.added = True else: self._photo.setPixmap(QtGui.Pixmap())