[Interest] Have the Websocket QML component go through QNetworkAccessManager

Kurt Pattyn pattyn.kurt at gmail.com
Wed Jun 18 07:35:50 CEST 2014



> On 17 Jun 2014, at 19:09, Ian Monroe <ian at monroe.nu> wrote:
> 
>> On Mon, Jun 9, 2014 at 10:00 AM, RĂ©mi Jannel <remi at mixlr.com> wrote:
>> Hi,
>> 
>> I am using the QWebsockets that is part of the release of Qt5.3.0 in QML. I
>> would like the requests to go through my QNetworkAccessManager but haven't
>> been able to make it work.
>> 
>> I am setting the QNetworkAccessManager like this on my QQuickView:
>> this->rootContext()->engine()->setNetworkAccessManagerFactory(new
>> MyManagerFactory());
>> 
>> This works fine for my XMLHttpRequest() that I make in QML but does not seem
>> to apply to the request made by my Websocket {} component when establishing
>> the connection.
>> 
>> Is there a way to make this work?
> 
> QWebSocket suspiciously isn't a QAbstractSocket...
Because a WebSocket is more like a protocol than a socket. A WebSocket connection starts as an HTTP connection and is then upgraded to a WebSocket connection.

Cheers,

Kurt

> Ian
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list