tags:

views:

16

answers:

0

Hi,

I am unable to send a signal updating a progress dialog from a QThread. I set up the thing like this (from within the MainWindow class):

self.progressDialog = QtGui.QProgressDialog("Packing ...", QtCore.QString(), 0,100, self.parent_)
self.thread = QtCore.QThread(parent = self.parent_)
self.thread.run = myRun
self.thread.start()
self.thread.QtCore.connect(self.thread, QtCore.SIGNAL("updateProgress"), self.progressDialog, QtCore.SLOT("setProgress(int progress, int totalSteps)"))

then, from within the myRun function, I try to emit the signal:

self.thread.emit(QtCore.SIGNAL("updateProgress"),progress,total)

But the progress dialog just does not update :(.

What am I doing wrong?

Thanks! Nathan