Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. WebKit issue whatsapp
QtWS25 Last Chance

WebKit issue whatsapp

Scheduled Pinned Locked Moved Unsolved Qt WebKit
4 Posts 3 Posters 943 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • elidrissizakE Offline
    elidrissizakE Offline
    elidrissizak
    wrote on last edited by
    #1

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

    my code

        QWebView *chromeView = new QWebView(this);
        chromeView->setGeometry(0,0,200,200);
        chromeView->load(QUrl("https://web.whatsapp.com/"));
        pagesWidget->addWidget(chromeView);
    

    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

    1 Reply Last reply
    0
    • QtHelexQ Offline
      QtHelexQ Offline
      QtHelex
      wrote on last edited by
      #2

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

      Scripting?

      1 Reply Last reply
      0
      • QtHelexQ Offline
        QtHelexQ Offline
        QtHelex
        wrote on last edited by
        #3

        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"            
                }
            }
        
        1 Reply Last reply
        1
        • G Offline
          G Offline
          GretchenMartin
          Banned
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved