In my code (python2.6, PyQt4) I do something like this:
def myRun():
doStuff
thread = QtCore.QThread()
thread.run = myRun
thread.start()
On my gentoo machine, this works perfectly. On a ubunut (9.10, Karmic Koala) it does not work, it says:
Type Error: myRun() takes no arguments (1 given)
Did something change in QT? How can I make this work on both machines?
Thanks!
Nathan
I’m not sure how that ever worked; you’re supposed to subclass QThread and override the run() method. The “takes no arguments” error is because the QT runtime is trying to pass “self” as the first argument of a class method. The following is closer to what you need:
UPDATED: Matching the original a bit more.