Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved How we can hidden"QtWebEngine Based Browser info" for websites that detecting browsers types...

    General and Desktop
    2
    2
    190
    Loading More Posts
    • 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.
    • stackprogramer
      stackprogramer last edited by stackprogramer

      How we can hidden"QtWebEngine Based Browser info" for websites that detect type browsers...i want to when i used Qt QtWebEngine, other thinks my browser is chrome or firefox...is there any way?

      for example this website detect my type browser.....https://www.whatismybrowser.com/
      YOUR WEB BROWSER IS:
      QtWebEngine Based Browser 5 on Windows 8

      thanks in advance

      1 Reply Last reply Reply Quote 0
      • B
        Bonnie last edited by Bonnie

        You need to change the user agent string.
        The c++ way is:

        QWebEngineProfile::defaultProfile()->setHttpUserAgent(userAgentString);
        

        (If you use other profile than the default one, then set user agent of that profile.)

        To get an user agent string for firefox, use firefox to open that https://www.whatismybrowser.com/
        On the bottom of the page you'll see "Your web browser's user agent"

        1 Reply Last reply Reply Quote 2
        • First post
          Last post