diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-11-03 14:28:48 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2022-11-30 13:21:42 +0100 |
commit | 148c42b57a0a0b0cf6b4088d319196805ee3c288 (patch) | |
tree | cb6553d212d0d80f9c1907c6756e1208e19bc1c9 | |
parent | d2607a120bb66d2f8ca7dd61ede617c5c2b340a2 (diff) |
Doc: Update the docs related to the Favicon
Fixes: QTBUG-106501
Change-Id: Ib70020d947b3010d22315db3bd32c017e55f71c7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 247e598a74b65ec82e10c03243a36038c13361f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/doc/src/qtwebengine-features.qdoc | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/core/doc/src/qtwebengine-features.qdoc b/src/core/doc/src/qtwebengine-features.qdoc index 33f1a54fa..4250d92a6 100644 --- a/src/core/doc/src/qtwebengine-features.qdoc +++ b/src/core/doc/src/qtwebengine-features.qdoc @@ -15,7 +15,7 @@ \li \l{Client Certificates} \li \l{Custom Schemes} \li \l{Drag and Drop} - \li \l{Favicon Handling} + \li \l{Favicon} \li \l{Fullscreen} \li \l{Hardware Acceleration} \li \l{HTML5 DRM} @@ -158,25 +158,37 @@ Support for this feature was added in Qt 5.7.0. - \section1 Favicon Handling + \section1 Favicon + + \QWE supports the web site URL icon, \e favicon. Each icon is stored in the internal + database for each \l QWebEngieProfile and can be accessed using a \l QWebEnginePage::icon() + call or a \l {WebEngineView::icon}{WebEngineView.icon} property for the currently loaded content. + + Moreover \QWE provides API for accessing already stored icons in the internal profile's database. + + \note The icon database is not available for off-the-record profiles. + + \section2 QML Favicon Handling For accessing icons a \c QQuickImageProvider is registered. This provider can be accessed by a special URL where the scheme is "image:" and the host is "favicon". - For example, + \qml Image { source: "image://favicon/url" } \endqml - The \c url can be the URL of the favicon. For example, + The \c url can be the URL of the favicon: + \qml Image { source: "image://favicon/https://www.qt.io/hubfs/2016_Qt_Logo/qt_logo_green_rgb_16x16.png" } \endqml - The \c url also can be a page URL to access its icon. For example, + The \c url also can be a page URL to access its icon: + \qml Image { source: "image://favicon/https://www.qt.io/" @@ -194,7 +206,12 @@ can be accessed without network connection too. The icon must be previously loaded to be stored in the database. - \note The icon database is not available for off-the-record profiles. + \section2 C++ Favicon Handling + + A user can request an icon from the previously loaded content for each + \l QWebEngineProfile using the \l QWebEngineProfile::requestIconForPageURL() or + \l QWebEngineProfile::requestIconForIconURL() calls. Note that the profile's database is + stored in the persistent storage and can be accessed without a network connection. \section1 Fullscreen |