[Twisted-Python] qt4 reactor status

Glenn Tarbox, PhD glenn at tarbox.org
Sun Jun 27 19:51:51 EDT 2010

On Sun, Jun 27, 2010 at 3:37 PM, <exarkun at twistedmatrix.com> wrote:

> On 26 Jun, 06:03 pm, sc at puzzlebox.info wrote:
> >Hello-
> >
> >     I'm wondering if anyone can fill me in on the current status and
> >plans for Qt support under Twisted?
> I think you nailed the status - it's an externally maintained reactor
> which probably works for some people.  As far as plans for support go,
> there aren't really any.  Most Twisted development happens without many
> specific plans though, so you shouldn't let that discourage you.
> >
> >     In the meantime, can anyone please update me if there has been any
> >further work or consideration towards official Qt support for Twisted?

One issue with "official" support is PyQt licensing.  If PySide is (or
becomes) an alternative, the licensing issue would disappear and Twisted
"could" include it in the distribution.

AFAIK, there hasn't been any substantial work on the qt4reactor beyond what
exists on launchpad and github.  I have a few patches aging in my inbox
which fix some Mac platform problems etc.


> Perhaps Qt's networking support is on par with Twisted's, though, and
> such wouldn't be necessary.  I don't know, as I have very little
> experience with Qt.  I just wanted to mention the idea.

The design of the qt4reactor was driven by the need to integrate two event
loops.  Qt has its own asynchronous event handling core which is exposed
through PyQt.  Fortunately, its fairly straightforward to register a
callback for twisted "stuff" (time and file descriptors) and it all works
pretty well... (meaning it passed Twisted's torture tests at the time it was
checked into launchpad).

There is a non-traditional initialization using a non-blocking call to
reactor.runReturn() which nails Twisted to PyQt.  From that point on,
Twisted behaves normally as does Qt / PyQt...  The way god intended.

The more fundamental question, IMHO, is the status and critical mass of
PySide.  Nokia was unable to reach agreement with Riverbank which caused
uncertainty after Qt's move to open source.  I don't know where this stands.

If PySide is solid, and the API is similar to PyQt (which is the intent),
porting qt4reactor to PySide is "probably" straightforward.  I'm guessing
that the qt4reactor remains functional as I've gotten email patches in the
past few months.

I would offer to check this out but I can't promise any timeline.  I'm
willing to field questions on any coding bizarreness to the degree my brain
hardening doesn't interfere.


> Jean-Paul
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Glenn H. Tarbox, PhD ||  206-274-6919 || glenn at tarbox.org - xmpp || ghtdak -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100627/1ad25795/attachment.htm 

More information about the Twisted-Python mailing list