Qt World Summit: Submit your Presentation

WebKit issue whatsapp

  • hello friends, when i use QWebView to load https://web.whatsapp.com/
    i have this problem, thanks

    my code

        QWebView *chromeView = new QWebView(this);

    i have try this code to change user agent but nothing :/

    QString QWebPageChrome::userAgentForUrl ( const QUrl & url ) const
    return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko)";

    my config , qt 5.9.8 mingw 32bits

    Sans titre.png

  • I just ran into the same issue. Seems something is missing?


  • Okay, changing the user agent was enough:

      WebEngineView {
            anchors.fill: parent
            url: "http://web.whatsapp.com"
            profile: webEngineProfile        
            WebEngineProfile {
                id: webEngineProfile
                httpUserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.129 Safari/537.36"            

  • Banned

    This post is deleted!

Log in to reply