diff --git a/webview/platforms/qt.py b/webview/platforms/qt.py index b8272348..9ed19b14 100755 --- a/webview/platforms/qt.py +++ b/webview/platforms/qt.py @@ -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: