Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngineView issue
Forum Update on Monday, May 27th 2025

QWebEngineView issue

Scheduled Pinned Locked Moved Solved QtWebEngine
2 Posts 1 Posters 507 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.
  • xavi-bX Offline
    xavi-bX Offline
    xavi-b
    wrote on last edited by
    #1

    Hi all,

    With the following code:

    #include <QApplication>
    #include <QWebEngineView>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        QWebEngineView w;
        w.setUrl(QUrl("https://web.whatsapp.com/"));
        w.show();
        return a.exec();
    }
    
    

    I get the following response from WhatsApp Web:
    Screenshot_2020-01-11_17-27-57.png

    I'm on Archlinux 64bit with Qt 5.14.

    The doc says "This version of Qt WebEngine is based on Chromium version 77.0.3865, with additional security fixes from newer versions." so there shouldn't be any problem, what's wrong here ?

    Thanks in advance,
    Xavier

    1 Reply Last reply
    0
    • xavi-bX Offline
      xavi-bX Offline
      xavi-b
      wrote on last edited by xavi-b
      #2

      Answer here: https://bugreports.qt.io/browse/QTBUG-81314

      #include <QApplication>
      #include <QWebEngineView>
      #include <QWebEngineProfile>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QWebEngineView w;
          w.page()->profile()->setHttpUserAgent(w.page()->profile()->httpUserAgent().remove(QRegExp("QtWebEngine\\/\\S{1,} ")));
          w.setUrl(QUrl("https://web.whatsapp.com/"));
          w.show();
          return a.exec();
      }
      
      1 Reply Last reply
      1

      • Login

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