I had the same problem but not related to the version.<br>The problem started when i changed<br>from PyQt4 import QtGui <br>to <br>from PyQt4.QtGui import *<br><br>So for cleaning the code clean and avoiding the timer issue try:
<br>from PyQt4 import QtGui as G, QtCore as C<br><br>and then use G.MainWindow etc...<br><br><div><span class="gmail_quote">On 8/10/07, <b class="gmail_sendername">Jason H</b> <<a href="mailto:scorp1us@yahoo.com">scorp1us@yahoo.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I started using Qt 4.3.1 and PyQt 4.3. When I added the QGraphicsScene, I got the error:
<br>QObject::startTimer: timers cannot be started from another thread<br>With out me actually using any timers.<br><br>Then I wrote the script below (Change sups.jpg) to another file you have on your system.<br>Everytime it renders the scene, the
<br>QObject::startTimer: timers cannot be started from another thread<br>message appears, and floods the console.<br><br>After a few moments of running, python crashes It typically rotates 3 or 4 times before crashing.<br>
<br>I am wondering what I am doing wrong?<br><br>TIA!<br><br><br><br><br><br>------------------------<br>import sys<br>from PyQt4.Qt import *<br><br>class TransformThread(QThread):<br> def __init__(self, item, *args):
<br> QThread.__init__(self, *args)<br> self.item=item<br> self.counter=0<br><br> def run(self):<br> while (1):<br> self.counter+=.1<br>
self.item.setTransform(QTransform().rotate(self.counter % 360))<br> QApplication.processEvents()<br> #self.msleep(1)<br><br>class MainWindow(QMainWindow):<br> def __init__(self, *argv):
<br> QMainWindow.__init__(self, *argv)<br> self.scene=QGraphicsScene()<br> self.gv=QGraphicsView(self.scene)<br> self.setCentralWidget(self.gv)<br> pixmap=QPixmap('
sups.jpg')<br> self.items=[QGraphicsPixmapItem(pixmap)]<br> self.threads=[]<br> for item in self.items:<br> self.scene.addItem(item)<br> self.threads.append
(TransformThread(item))<br> self.threads[-1].start()<br><br><br>if __name__=='__main__':<br> a=QApplication(sys.argv)<br> w=MainWindow()<br> w.show()<br> a.exec_()<br><br><br><br><br><br>
<br><br>____________________________________________________________________________________<br>Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.<br><a href="http://autos.yahoo.com/carfinder/">
http://autos.yahoo.com/carfinder/</a><br><br>_______________________________________________<br>PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br><a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">
http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br>