[PyQt] doubt with QtCore.QThread
Pradnyesh Sawant
spradml at gmail.com
Tue Oct 2 15:41:58 BST 2007
Hello,
I have this code, which seems to be correct, but will not run :((
##################################################
import sys
from PyQt4 import QtCore, QtGui
class Tmp(QtGui.QDialog, QtCore.QThread):
def __init__(self, parent = None):
QtGui.QDialog.__init__(self, parent)
QtCore.QThread.__init__(self)
def run(self):
print 'Test inside run :)'####
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
t = Tmp()
t.show()
t.start()
sys.exit(app.exec_())
##################################################
the error it gives is:
AttributeError: start
although, 'print dir(t)' shows start to be an element of t
--
warm regards,
Pradnyesh Sawant
--
There are two kinds of people: those who do the work, and those who take
the credit. Try to be in the first group; there is less competition there.
--Indira Gandhi
More information about the PyQt
mailing list