What I see happening is a problem in the threading it sends the entire loop before the signal sends its data back. I am confused why it's doing this
The code in Question I posted below but the full code is available on suck-o code
Code: Select all
def video(self):
cam = Device()
cam.setResolution(640, 480)
for i in range(10):
a = datetime.datetime.now().strftime("%Y%m%dT%H%M%S%ms")
b = str(a)
try:
cam.saveSnapshot(os.getcwd() + '\\camImages\\' + '%s.png' % (b))
except:
print "missed image"
continue
self.clientAll(chr(CMD_VIDEO), os.getcwd() + '\\camImages\\' + '%s.png' % (b))
def viewVideo(self, msg):
print msg
self.myVideo.setPixmap(QPixmap(msg))
Let me explain: In my main GUI class I have it threaded I use this to initiate a signal
Code: Select all
self.thread.mySignal5.connect(self.viewVideo)
Code: Select all
mySignal5 = pyqtSignal('PyQt_PyObject')
Code: Select all
elif cmd == CMD_VIDEO:
self.mySignal5.emit(msg)
#print msg
http://code.suck-o.com/42399