[Interest] Qt Webkit and HTML5 geolocation

Tom Isaacson Tom.Isaacson at navico.com
Fri Sep 6 07:49:08 CEST 2013


I'm trying to get HTML5 geolocation working in Qt Webkit. The problem is not so much that it doesn't work as QtWebkit doesn't seem to recognise "navigator.geolocation" in Javascript. I'm obviously not the first person to try this:
http://stackoverflow.com/questions/9861349/qt-webkit-and-html5-geolocation
http://qt-project.org/forums/viewthread/15748
but nobody seems to have found a solution yet. I've got a simple Javascript test:
    if(navigator.geolocation)
    {
        navigator.geolocation.getCurrentPosition(displayLocation);
    }
    else
    {
        alert("No geolocation support");
    }

This works in Chrome and Firefox but fails on the browser demo ([QTDIR]\demos\browser) in Qt 4.8.2, 4.8.5 and 5.0. Does this feature actually work, or was it a mistake to list it in the release notes for Qt 4.7:
http://trac.webkit.org/wiki/QtWebKitFeatures22

Tom


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130906/69fd60ef/attachment.html>


More information about the Interest mailing list