[Qtwebengine] How to change user agent?

Pierre Rossi pierre.rossi at gmail.com
Tue Jan 21 13:22:16 CET 2014


Hi,

I think you'll most likely need something like this for your needs:
https://codereview.qt-project.org/#change,75125

It is essentially just missing the permission granting part (which could be
a bit of a problem if the contents you load are untrusted, you have been
warned).

We don't have user agent string overriding implemented yet (shouldn't be
too hard, we just didn't get around to it), but in that case, WebRTC should
work everywhere they sniff the UA-string thanks to adding the a mention of
Chromium and the version we're based off alongside the usual suspects
(Mozilla, WebKit, KHTML, Gecko and Safari).

Feedback is most welcome of course.

Cheers,
--
Pierre


On Tue, Jan 21, 2014 at 8:06 AM, Fabian Bernhard <fbernhard at gmail.com>wrote:

> Dear list,
>
> Thank you for this project!
>
> I need to create a small fallback application for a WebRTC web application
> for those Windows users who, for whatever reason, can't install Google
> Chrome on their machines.
>
> I have not advanced much with testing because I first need to change the
> user agent to the standard Google Chrome user agent. Otherwise Javascript
> frameworks won't recognise the browser and throw an error. Check for
> instance:
>
> https://apprtc.appspot.com
>
> How can I change the complete user agent string, preferably in the example
> project "widgetsnanobrowser"?
>
> Thank you!
>
> Fabian
>
> _______________________________________________
> QtWebEngine mailing list
> QtWebEngine at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qtwebengine
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qtwebengine/attachments/20140121/da5537d6/attachment.html>


More information about the QtWebEngine mailing list