iblqt.widgets.RestrictedWebView
- class iblqt.widgets.RestrictedWebView[source]
Bases:
QWidget
A browser widget that restricts navigation to a trusted URL prefix.
- __init__(url, trusted_url_prefix=None, use_tool_tips=True, use_status_tips=False, parent=None)[source]
Initialize the RestrictedWebView.
- Parameters:
trusted_url_prefix (
str
, optional) – Prefix of trusted URLs. Clicking on links to matching URLs will open in the widget’s web engine view, while other links will open in the default web browser. Defaults to the value of url.use_tool_tips (
bool
, optional) – Whether to set default tool tips for the buttons. Default is True.use_status_tips (
bool
, optional) – Whether to set default status tips for the buttons. Default is False.
- setTrustedUrlPrefix(trusted_url_prefix)[source]
Set the trusted URL prefix.
- Parameters:
trusted_url_prefix (
str
) – The prefix of trusted URLs. Clicking on links to matching URLs will open in the widget’s web engine view, while other links will open in the default web browser.