[Twisted-Python] Twisted and Qt5

2013-07-20 Thread Burak Nehbit
Hi,

I have a question and a general guidance request on handling Qt and Twisted 
together. This is nearly as much a Qt question as it is a Twisted one, so I 
apologise in advance if this is off–topic.

To give a little bit of a background, I am building a desktop GUI application 
which I am coding using Python and Javascript. The back–end is Python, which 
makes use of SQLAlchemy, Twisted and several other Python frameworks. The GUI 
is in Qt, currently linked to Python with PyQt, but I will probably replace it 
with PySide before release. I am using Qt to draw a QtWebkit frame, in which I 
run Angular JS to serve up my visual interface, plus a host of other data 
presentation logic. 

Which is, it turns out, quite an impasse, because if I use Qt4, the GUI of my 
application renders in … 12 seconds. Qt5 and its version of QtWebkit loads the 
same thing in 300 milliseconds. I am therefore forced to use Qt5. This is how I 
end up with an application where both Twisted and Qt5 are essential 
requirements. Now, my questions are these:

1) I know there is a Qt4 reactor (which I managed to get to work and pass the 
twisted test suite) for Twisted. Is there such a thing for Qt5? Is it planned? 

2) In the case it's not, are there any alternatives to having a Qt5 reactor? My 
Twisted knowledge is still woefully inexact (I'm still reading the Twisted 
book), so I am not very well versed on alternative ways to accomplish this. The 
one way I can see is to modify the Twisted Qt4 reactor to work with Qt5, but I 
have almost no knowledge of C++, so this seems far–fetched.

This is my only unsolved question about my application— a project of love and 
learning rather than a commercial one—so if I can figure this out, I'll be well 
on my way. In case there is nothing to be done about this and a Qt5 reactor is 
an imperative, I would be willing to finance this to the best of my ability; 
I'm a student, but I can try to pay whatever is needed to have this reactor 
done, open sourced—and added to Twisted core, if desired. If there is such a 
project on its way, I can be a tester. If nobody is interested I would be very 
happy if you could give me a lead on how to make my own reactor; if I succeed I 
can release it as open source. Likely I am not a programmer good enough to make 
that happen, though! 

Qt is pretty much the only decent GUI framework in existence and almost the 
only way to have a Python application with a web–stack GUI, which is one of the 
most popular ways desktop applications are designed these days. If you know of 
another way to run Webkit as a Python GUI, I'd love to hear that too, but to 
the extent of my research this looks impossible without Qt. 

Thanks!

Best,
Burak




smime.p7s
Description: S/MIME cryptographic signature
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted and Qt5

2013-07-20 Thread Itamar Turner-Trauring

On 07/20/2013 08:04 AM, Burak Nehbit wrote:


1) I know there is a Qt4 reactor 
 (which I managed to get to work 
and pass the twisted test suite) for Twisted. Is there such a thing 
for Qt5? Is it planned?
Have the Qt APIs changed enough that you can't just use the qt4 reactor 
with qt5?


___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted and Qt5

2013-07-20 Thread Burak Nehbit
There are significant changes in the signalling mechanisms in Qt5, but I have 
not tried yet. I'll try quite soon and return with my findings, but with the 
little knowledge I have, I would say it might be unlikely that it works without 
modification.
—
Sent from my phone

On Sat, Jul 20, 2013 at 3:46 PM, Itamar Turner-Trauring
 wrote:

> On 07/20/2013 08:04 AM, Burak Nehbit wrote:
>>
>> 1) I know there is a Qt4 reactor 
>>  (which I managed to get to work 
>> and pass the twisted test suite) for Twisted. Is there such a thing 
>> for Qt5? Is it planned?
> Have the Qt APIs changed enough that you can't just use the qt4 reactor 
> with qt5?
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


[Twisted-Python] adoptStreamConnection (was Re: Setting socket options before connect)

2013-07-20 Thread exarkun

On 01:35 am, ter...@gmail.com wrote:


Sorry it is not exactly about the subject, but what is the current API 
that

accepts already connected socket?
Some time ago I was looking for such an API without success (probably 
not

very hard though).


IReactorSocket.adoptStreamConnection was recently added:

http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReactorSocket.html

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python