WebEngineView
Qt Base Class: QWebEngineView
Signature: QWebEngineView(self, page: PySide6.QtWebEngineCore.QWebEnginePage, parent: Optional[PySide6.QtWidgets.QWidget] = None) -> None
QWebEngineView(self, parent: Optional[PySide6.QtWidgets.QWidget] = None) -> None
QWebEngineView(self, profile: PySide6.QtWebEngineCore.QWebEngineProfile, parent: Optional[PySide6.QtWidgets.QWidget] = None) -> None
Base classes
Name | Children | Inherits |
---|---|---|
WidgetMixin prettyqt.widgets.widget |
||
QWebEngineView PySide6.QtWebEngineWidgets QWebEngineView(self, page: PySide6.QtWebEngineCore.QWebEnginePage, parent: Optional[PySide6.QtWidgets.QWidget] \= None) -> None |
⋔ Inheritance diagram
graph TD
1473574715168["webenginewidgets.WebEngineView"]
1473293688240["widgets.WidgetMixin"]
1473299815024["core.ObjectMixin"]
140713234304496["builtins.object"]
1473245548480["gui.PaintDeviceMixin"]
1473574739568["QtWebEngineWidgets.QWebEngineView"]
1473290849680["QtWidgets.QWidget"]
1473288842240["QtCore.QObject"]
1473291690208["Shiboken.Object"]
1473300082368["QtGui.QPaintDevice"]
1473293688240 --> 1473574715168
1473299815024 --> 1473293688240
140713234304496 --> 1473299815024
1473245548480 --> 1473293688240
140713234304496 --> 1473245548480
1473574739568 --> 1473574715168
1473290849680 --> 1473574739568
1473288842240 --> 1473290849680
1473291690208 --> 1473288842240
140713234304496 --> 1473291690208
1473300082368 --> 1473290849680
1473291690208 --> 1473300082368
🛈 DocStrings
Bases: WidgetMixin
, QWebEngineView
Source code in prettyqt\webenginewidgets\webengineview.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
find_text(string: str, backward: bool = False, case_sensitive: bool = False, callback: Callable[[bool], None] | None = None)
Find text in the current page.
Finds the specified string, subString, in the page, using the given options. The findTextFinished() signal is emitted when a string search is completed.
To clear the search highlight, just pass an empty string.
The resultCallback must take a boolean parameter. It will be called with a value of true if the subString was found; otherwise the callback value will be false.
Warning: It is guaranteed that the callback is always called, but it might be done during page destruction. When WebEnginePage is deleted, the callback is triggered with an invalid value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
string |
str
|
string to search for |
required |
backward |
bool
|
search backwards |
False
|
case_sensitive |
bool
|
case-sensitive search |
False
|
callback |
Callable[[bool], None] | None
|
result callback |
None
|
Source code in prettyqt\webenginewidgets\webengineview.py
load_url(url: datatypes.UrlType | datatypes.PathType)
Load the URL.
Loads the specified url and displays it.
Note: The view remains the same until enough data has arrived to display the new URL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
UrlType | PathType
|
URL to load |
required |
Source code in prettyqt\webenginewidgets\webengineview.py
set_url(url: datatypes.UrlType | datatypes.PathType)
Set the url of the WebEngineView.
Clears the view and loads the URL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
UrlType | PathType
|
URL to set |
required |
set_zoom(zoom: float)
Set the zoom factor for the view.
Valid values are within the range from 0.25 to 5.0. The default factor is 1.0.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zoom |
float
|
Zoom factor |
required |
⌗ Property table
Qt Property | Type | Doc |
---|---|---|
objectName |
QString | |
modal |
bool | |
windowModality |
Qt::WindowModality | |
enabled |
bool | |
geometry |
QRect | |
frameGeometry |
QRect | |
normalGeometry |
QRect | |
x |
int | |
y |
int | |
pos |
QPoint | |
frameSize |
QSize | |
size |
QSize | |
width |
int | |
height |
int | |
rect |
QRect | |
childrenRect |
QRect | |
childrenRegion |
QRegion | |
sizePolicy |
QSizePolicy | |
minimumSize |
QSize | |
maximumSize |
QSize | |
minimumWidth |
int | |
minimumHeight |
int | |
maximumWidth |
int | |
maximumHeight |
int | |
sizeIncrement |
QSize | |
baseSize |
QSize | |
palette |
QPalette | |
font |
QFont | |
cursor |
QCursor | |
mouseTracking |
bool | |
tabletTracking |
bool | |
isActiveWindow |
bool | |
focusPolicy |
Qt::FocusPolicy | |
focus |
bool | |
contextMenuPolicy |
Qt::ContextMenuPolicy | |
updatesEnabled |
bool | |
visible |
bool | |
minimized |
bool | |
maximized |
bool | |
fullScreen |
bool | |
sizeHint |
QSize | |
minimumSizeHint |
QSize | |
acceptDrops |
bool | |
windowTitle |
QString | |
windowIcon |
QIcon | |
windowIconText |
QString | |
windowOpacity |
double | |
windowModified |
bool | |
toolTip |
QString | |
toolTipDuration |
int | |
statusTip |
QString | |
whatsThis |
QString | |
accessibleName |
QString | |
accessibleDescription |
QString | |
layoutDirection |
Qt::LayoutDirection | |
autoFillBackground |
bool | |
styleSheet |
QString | |
locale |
QLocale | |
windowFilePath |
QString | |
inputMethodHints |
QFlags |
|
title |
QString | |
url |
QUrl | |
iconUrl |
QUrl | |
icon |
QIcon | |
selectedText |
QString | |
hasSelection |
bool | |
zoomFactor |
double |