![]() |
N9 Qt: use build in browserengine instead of QtWebkit ?
2 Attachment(s)
Hi!
twitter has updated their mobile website "app" for Android and iOS. We are able to use this "app" at our N9/50, too. We simply have to load the mobile twitter page at the build in webbrowser. Have a look at the second screenshot below. Sadly the screen is not very well used and I would prefer to hide the adress and the status bar on top of the page. So I thought I could create simly my own browser using Qt and qml: Code:
import QtQuick 1.1 Has anyone a idea? Am I able to use the engine of the build in browser instead of QtWebKit? |
Re: N9 Qt: use build in browserengine instead of QtWebkit ?
Based entirely on what I've read at various places and tried out on the n950 and n9:
1. The default browser uses Webkit 2. 2. I've not yet found a way to change the UA of the default browser 3. QML uses Webkit 1.x - your code imports version 1.0 4. I've not been able to figure out how to get to the underlying QWebPage of the QML web page to change its UA. 5. If you use a QWebPage as an object inside your QML, you will be able to subclass it to change the UA. |
Re: N9 Qt: use build in browserengine instead of QtWebkit ?
Thanks for your reply, uvatbc! :)
Quote:
Hence there is no QtWebkit 2.0 to import I'm now quite sure this small project won't work without access to the engine of the build in browser. Fenec (Firefox) and Opera are getting the old mobile twitter page, too. :( |
Re: N9 Qt: use build in browserengine instead of QtWebkit ?
WebKit2 is only process separation branch, hence probably not much difference from the QML WebKit widget.
If you manage to run it before the Twitter scripts, you can change the userAgent directly in the page by using __defineGetter__ Code:
window.navigator.__defineGetter__("userAgent", function () { return "new UA" }); |
Re: N9 Qt: use build in browserengine instead of QtWebkit ?
Quote:
|
All times are GMT. The time now is 10:49. |
vBulletin® Version 3.8.8