[IPython-dev] problems with qt4 threading
Fri Sep 7 09:15:40 CDT 2007
On Thursday 06 September 2007 05:20:50 pm Darren Dale wrote:
> On Thursday 06 September 2007 12:55:31 pm Fernando Perez wrote:
> > Hey Darren,
> > On 9/6/07, Darren Dale <firstname.lastname@example.org> wrote:
> > > I just got a response from Trolltech. The support engineer said that if
> > > we continuously receive these warning messages, it means we are calling
> > > qapplication.exec_ over and over again, which is we shouldnt be doing.
> > >
> > > He also said that the warning messages can be suppressed if the global
> > > QT_NO_WARNING_OUTPUT is defined
> > > (http://doc.trolltech.com/4.3/qtglobal.html#qWarning). I tried adding
> > >
> > > global QT_NO_WARNING_OUTPUT
> > > QT_NO_WARNING_OUTPUT = True
> > >
> > > to IPShellQt4.__init__, but it didnt have any effect. Does anyone know
> > > if, and if so why, ipython is calling exec_() at each timeout?
> > I didn't write that code (I think you did),
> I copied it from the qt3 code, which I didnt write...
> > but looking into
> > IPython.Shell, I see this in mainloop() of the Qt4 shell (line 1003):
> > while True:
> > if self.IP._kill: break
> > QtGui.qApp.exec_()
> > self.join()
> > You may want to play with that...
> I'm attaching a short standalone script that might shed a little more
> light. I've been running it from inside ipython. If the raw_input line in
> run is uncommented, I get the qt warnings. If I comment it out, and I
> uncomment the following two lines, I dont see the warnings. (The mainloop
> in my script doesnt have the while statement mentioned above.)
I posted to the PyQt mailing list, and Phil Thompson suggested installing the
latest snapshots (qt-4.3.2, sip-4.7, pyqt-4.3). I did so this morning (using
some custom gentoo ebuilds), and it appears the issue has been resolved
without requiring any changes to ipython. I posted a comment at the trac
site, but I can't close the bug. Maybe the bug should be marked as pending
until the official releases are available.
More information about the IPython-dev