qt4reactor.install() should be the first line after you create your QApplication instance.
You might also want to use the attached qtreactor, since some of the older ones I've found will give out that QObject error. http://www.nabble.com/file/p23474488/qt4reactor.py qt4reactor.py markus espenhain wrote: > > On Sun, 2009-05-10 at 08:32 -0400, inhahe wrote: >> Hello, can someone help me with the following code: >> >> --- >> >> from PyQt4 import QtGui, QtCore >> import sys, qt4reactor >> >> app = QtGui.QApplication(sys.argv) >> mainwin = QtGui.QMainWindow() >> mainwin.showMaximized() >> qt4reactor.install(app) >> from twisted.internet import reactor >> >> reactor.run() >> >> --- >> >> the problem is the console window keeps displaying >> >> QObject: Do not delete object, 'unnamed', during its event handler! >> QObject: Do not delete object, 'unnamed', during its event handler! >> QObject: Do not delete object, 'unnamed', during its event handler! >> QObject: Do not delete object, 'unnamed', during its event handler! >> QObject: Do not delete object, 'unnamed', during its event handler! >> QObject: Do not delete object, 'unnamed', during its event handler! >> >> etc., a few times per second. the app seems to work, but that still >> bothers me. i want it to be Done Right. >> >> i'm using pyqt 4.3 and python 2.5 on windows xp. >> > > hi > > we are using twisted and qt4reactor > (http://www.tarbox.org/qtreactor/index.html + twisted 8.1 + qt 4.3/4/5 + > python 2.5) on linux and i haven't seen such messages before - our > setup/run is different - maybe this helps > > ... > > from PyQt4 import QtCore, QtGui > app = QtGui.QApplication(sys.argv) > from lipy import qt4reactor > qt4reactor.install() > from twisted.internet import reactor > > # mainwin creation etc > # ... > > reactor.runReturn() > sys.exit(app.exec_()) > > markus > >> _______________________________________________ >> PyQt mailing list [email protected] >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > _______________________________________________ > PyQt mailing list [email protected] > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > -- View this message in context: http://www.nabble.com/help-with-qt4reactor.py--tp23469814p23474488.html Sent from the PyQt mailing list archive at Nabble.com. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
