To use the twisted reactor inside a Qt gui application, I’m using the qt4reactor package:
app = QtGui.QApplication(sys.argv) import qt4reactor qt4reactor.install() from twisted.internet import reactor factory = Factory() gui = Gui(app) gui.show() reactor.runReturn() sys.exit(app.exec_())
But I realized that after the “reactor.runReturn()” line, each QFileDialog freezes the complete program.
filename = QtGui.QFileDialog.getOpenFileName()
A solution is to use the non-native dialog instead:
filename = QtGui.QFileDialog.getOpenFileName(options=QtGui.QFileDialog.DontUseNativeDialog)
0 Comments.