diff options
Diffstat (limited to 'src/webenginequick/doc/src/webengineview_lgpl.qdoc')
-rw-r--r-- | src/webenginequick/doc/src/webengineview_lgpl.qdoc | 145 |
1 files changed, 128 insertions, 17 deletions
diff --git a/src/webenginequick/doc/src/webengineview_lgpl.qdoc b/src/webenginequick/doc/src/webengineview_lgpl.qdoc index 6534518e7..bbefcd2bc 100644 --- a/src/webenginequick/doc/src/webengineview_lgpl.qdoc +++ b/src/webenginequick/doc/src/webengineview_lgpl.qdoc @@ -24,7 +24,7 @@ \l QtWebEngineQuick::initialize in the application main source file, as illustrated by the following code snippet: - \quotefromfile webenginequick/minimal/main.cpp + \quotefromfile minimal/main.cpp \skipto main \printuntil } @@ -39,7 +39,7 @@ The following sample QML application loads a web page using the \c url property: - \quotefromfile webenginequick/minimal/main.qml + \quotefromfile minimal/main.qml \skipto import \printuntil /^\}/ @@ -356,9 +356,8 @@ This method offers a lower-level alternative to the \c{url} property, which references HTML pages via URL. - External objects, such as stylesheets or images referenced in the HTML - document, should be located relative to \a baseUrl. For external objects to - be loaded, \c baseUrl cannot be empty. For example, if \a html + \a baseUrl is optional and used to resolve relative URLs in the document, + such as referenced images or stylesheets. For example, if \a html is retrieved from \c http://www.example.com/documents/overview.html, which is the base URL, then an image referenced with the relative URL, \c diagram.png, should be at \c{http://www.example.com/documents/diagram.png}. @@ -368,6 +367,8 @@ /*! \qmlmethod void WebEngineView::runJavaScript(string script, variant callback) + \qmlmethod void WebEngineView::runJavaScript(string script, int worldId, variant callback) + Runs the specified \a script in the content of the web view. The \a callback parameter is optional. If a callback function is provided, @@ -382,8 +383,10 @@ example, \c{Date} and \c{ArrayBuffer}. Unsupported data types include, for example, \c{Function} and \c{Promise}. - The script will run in the same \e world as other scripts that are - part of the loaded site. + To avoid conflicts with other scripts executed on the page, the world in + which the script is run can be specified by \a worldId. The world ID must be + between \c 0 and \c 256. If you leave out the \c world ID, the script is + run in the \c MainWorld. \warning Do not execute lengthy routines in the callback function, because it might block the rendering of the web content. @@ -787,6 +790,7 @@ Exit the fullscreen mode. (Added in Qt 5.6) \value WebEngineView.SavePage Save the current web page to disk. (Added in Qt 5.7) + \omitvalue WebEngineView.OpenLinkInNewBackgroundTab \value WebEngineView.ViewSource Show the source of the current page in a new tab. Requires a handler for the \l newWindowRequested() signal. (Added in Qt 5.8) @@ -831,6 +835,10 @@ Inserts an unordered list at the current cursor position, deleting the current selection. Requires \c contenteditable="true". (Added in Qt 5.10) + \value WebEngineView.ChangeTextDirectionLTR + Changes text direction to left-to-right in the focused input element. (Added in Qt 6.6) + \value WebEngineView.ChangeTextDirectionRTL + Changes text direction to right-to-left in the focused input element. (Added in Qt 6.6) \omitvalue WebActionCount */ @@ -848,13 +856,22 @@ Video devices, such as cameras. \value WebEngineView.MediaAudioVideoCapture Both audio and video capture devices. - \value DesktopVideoCapture + \value WebEngineView.DesktopVideoCapture Video output capture, that is, the capture of the user's display. (Added in Qt 5.10) - \value DesktopAudioVideoCapture + \value WebEngineView.DesktopAudioVideoCapture Both audio and video output capture. (Added in Qt 5.10) - \value WebEnginView.Notifications + \value WebEngineView.Notifications Web notifications for the end-user. + \value WebEngineView.ClipboardReadWrite + Read and write access for the clipboard. If both \l{WebEngineSettings::JavascriptCanPaste} + {JavascriptCanPaste} and \l{WebEngineSettings::JavascriptCanAccessClipboard} + {JavascriptCanAccessClipboard} settings are enabled, this permission will always be granted + automatically and no feature requests will be made. + (Added in Qt 6.8) + \value WebEngineView.LocalFontsAccess + Access to the fonts installed on the user's machine. Only available on desktop platforms. + (Added in Qt 6.8) \sa featurePermissionRequested(), grantFeaturePermission() */ @@ -996,8 +1013,6 @@ \value WebEngineView.EnvelopePrc10 \value WebEngineView.EnvelopeYou4 \value WebEngineView.LastPageSize = \c EnvelopeYou4 - \omitvalue NPageSize - \omitvalue NPaperSize \sa WebEngineView::printToPdf() */ @@ -1230,10 +1245,13 @@ /*! \qmlsignal WebEngineView::quotaRequested(QuotaRequest request) \since QtWebEngine 1.7 + \deprecated [6.5] This signal is no longer emitted. + + Requesting host quota is no longer supported by Chromium. + The behavior of navigator.webkitPersistentStorage + is identical to navigator.webkitTemporaryStorage. - This signal is emitted when the web page issues a \a request for a larger persistent storage - than the application's current allocation in File System API. The default quota - is 0 bytes. + For further details, see https://crbug.com/1233525 \sa QuotaRequest */ @@ -1297,6 +1315,20 @@ */ /*! + \qmlproperty WebEngineView WebEngineView::devToolsId + \since QtWebEngine 6.6 + \readonly + + The id of the developer tools host associated with this page. + + If remote debugging is enabled (see \l{Qt WebEngine Developer Tools}), the id can be used to + build the URL to connect to the developer tool websocket: + \c{ws://localhost:<debugggin-port>/devtools/page/<id>)}. The websocket can be used to to interact + with the page using the \l{https://chromedevtools.github.io/devtools-protocol/}{DevTools + Protocol}. +*/ + +/*! \qmlmethod WebEngineAction WebEngineView::action(WebAction action) \since 5.12 @@ -1312,10 +1344,11 @@ */ /*! - \qmlsignal WebEngineView::printRequest + \qmlsignal WebEngineView::printRequested \since QtWebEngine 1.8 - This signal is emitted when the JavaScript \c{window.print()} method is called. + This signal is emitted when the JavaScript \c{window.print()} method is called or the user pressed the print + button of PDF viewer plugin. Typically, the signal handler can simply call printToPdf(). \sa printToPdf @@ -1498,6 +1531,84 @@ // ... } \endcode + + The touch handles can be also switched dynamically: + + \code + Component { + id: circleTouchHandle + Rectangle { + color: "blue" + radius: 50 + } + } + function showDefaultHandle(isDefault) { + if (isDefault) + webEngineView.touchHandleDelegate = circleTouchHandle + else + webEngineView.touchHandleDelegate = null + } + \endcode + + \note If no delegate is provided, Chromium's default touch handles will appear. + +*/ + +/*! + \qmlproperty webEngineFrame WebEngineView::mainFrame + \since QtWebEngine 6.8 + + The main, top-level frame of the page. All other frames on this page are accessible + as children of the main frame. + */ + +/*! + \qmlmethod webEngineFrame WebEngineView::findFrameByName(string name) + \since QtWebEngine 6.8 + + Returns the frame with the given \a name. If there are multiple frames with the same + name, which one is returned is arbitrary. If no frame was found, returns an + \l{webEngineFrame::isValid}{invalid} frame. +*/ + +/*! + \qmlmethod void WebEngineView::save(const QString &filePath, QWebEngineDownloadRequest::SavePageFormat format) + \since QtWebEngine 6.6 + + Save the current web page to disk. + + The web page is saved to \a filePath in the specified \a{format}. + + This is a shortcut for the following actions: + \list + \li Trigger the Save web action. + \li Accept the next download item and set the specified file path and save format. + \endlist + + This function issues an asynchronous download request for the web page and returns immediately. + + \sa QWebEngineDownloadRequest::SavePageFormat +*/ + +/*! + \qmlsignal WebEngineView::webAuthUxRequested(QWebEngineWebAuthUxRequest *request); + \since QtWebEngine 6.7 + + This signal is emitted when a WebAuth authenticator requires user interaction + during the authentication process. These requests are handled by displaying a dialog to the user. + + The \a request contains the information and API required to complete the WebAuth UX request. + + \sa QWebEngineWebAuthUxRequest +*/ + +/*! + \qmlsignal WebEngineView::zoomFactorChanged(qreal factor); + \since QtWebEngine 6.8 + + This signal is emitted whenever the zoom \a factor for the page changes. + + \sa zoomFactor */ \sa {WebEngine Qt Quick Custom Touch Handle Example} |