Inherits QObject.
|
def | __init__ (self, parent=None) |
|
bool | openUrl (self, str target_url, List[str] allowed_schemes) |
|
Helper class used to open URLs from QML.
◆ openUrl()
bool UM.Qt.Bindings.Utilities.UrlUtil.openUrl |
( |
|
self, |
|
|
str |
target_url, |
|
|
List[str] |
allowed_schemes |
|
) |
| |
Opens the target_url if it has an allowed and valid scheme. This function can be called inside QML files.
:param target_url: The URL string to be opened e.g. 'https://example.org'
:param allowed_schemes: A list of the schemes that are allowed to be opened e.g. ['http', 'https']
:return: True if the URL opens successfully, False if an invalid scheme is used
The documentation for this class was generated from the following file:
- UM/Qt/Bindings/Utilities.py