I'm trying to run a simple application with Twisted and Qt4, but I get a <br>really strange behavior from my main script.<br><br>I can't understand if it's <br>a python<br>or a twisted<br>or a Qt4<br>problem<br><br>I'm using this reactor:
<br> <a href="http://twistedmatrix.com/trac/attachment/ticket/1770/qt4reactor.py">http://twistedmatrix.com/trac/attachment/ticket/1770/qt4reactor.py</a><br><br>Now,<br>if I run this:<br># >>>>>>>>>
<br>import qt4reactor<br>import sys<br>from PyQt4 import QtGui<br>from winIum import Window<br><br>def main():<br> app = QtGui.QApplication(sys.argv)<br> qt4reactor.install(app)<br> MainWindow = QtGui.QMainWindow
()<br> win = Window(MainWindow)<br> MainWindow.show()<br> from twisted.internet import reactor<br> reactor.run()<br># <<<<<<<<<br>my window shows and run correctly.<br><br><br>If I run this:
<br># >>>>>>>>>>>>><br>import qt4reactor<br>import sys<br>from PyQt4 import QtGui<br>from winIum import Window<br><br>def creApp():<br> app = QtGui.QApplication(sys.argv)<br>
qt4reactor.install(app)<br> return app<br>def creWin():<br> MainWindow = QtGui.QMainWindow()<br> win = Window(MainWindow)<br> MainWindow.show()<br>def main():<br> app = creApp()<br> creWin()<br> from
twisted.internet import reactor<br> reactor.run()<br># <<<<<<<<<<<<<<br>my window doesn't show and the script doesn't stop but remains trapped in<br>some gui loop.<br> <br>What's the problem I can't see??
<br><br>Thank you in advance for any help.<br>Licia