Skip to content

Commit

Permalink
Merge pull request #1257 from TransparentLC/TransparentLC-patch-1
Browse files Browse the repository at this point in the history
[QT] Fix user_agent
  • Loading branch information
r0x0r authored Nov 15, 2023
2 parents ac64e1a + 0b501dd commit fd24ac1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webview/platforms/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ def __init__(self, window):
'--enable-features=AutoplayIgnoreWebAudio',
)

user_agent = settings.get('user_agent') or _settings['user_agent']
if user_agent and is_webengine:
self.view.page().profile().setHttpUserAgent(user_agent)

if _settings['debug'] and is_webengine:
# Initialise Remote debugging (need to be done only once)
if not BrowserView.inspector_port:
Expand Down

0 comments on commit fd24ac1

Please sign in to comment.