WebKit issue whatsapp
Unsolved
Qt WebKit
-
hello friends, when i use QWebView to load https://web.whatsapp.com/
i have this problem, thanksmy 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
-
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" } }
-
This post is deleted!