// Copyright (C) 2019 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! \page qtwebenginewidgets-qtwebkitportingguide.html \title Porting from Qt WebKit to Qt WebEngine \brief Overview of the differences between the Qt \WebKit and \QWE API. The following sections contain information about porting an application that uses the \l{http://doc.qt.io/archives/qt-5.3/qtwebkit-index.html}{Qt WebKit} \l{http://doc.qt.io/archives/qt-5.3/qml-qtwebkit-webview.html}{QWebView API} to use the \l{Qt WebEngine} QWebEngineView. \section1 Architecture Chromium provides its own network and painting engines, which \QWE uses. This, among other things, allows \QWE to provide better and more reliable support for the latest HTML5 specification than Qt \WebKit. However, \QWE is thus also heavier than Qt \WebKit and does not provide direct access to the network stack and the HTML document through C++ APIs. \section1 Class Names The \QWE equivalent of Qt \WebKit C++ classes are prefixed by "\e QWebEngine" instead of "\e QWeb". \b {Qt \WebKit} \code #include #include #include #include QWebHistory QWebHistoryItem QWebPage QWebView \endcode \b {\QWE} \code #include #include #include #include QWebEngineHistory QWebEngineHistoryItem QWebEnginePage QWebEngineView \endcode \section1 Qt Module Name \section2 In qmake Project Files \b {Qt \WebKit} \code QT += webkitwidgets \endcode \b {\QWE} \code QT += webenginewidgets \endcode \section2 Including the Module in Source Files \b {Qt \WebKit} \code #include #include // With Qt >= 4.8 \endcode \b {\QWE} \code #include \endcode \section1 QWebFrame Has Been Merged into QWebEnginePage HTML frames can be used to divide web pages into several areas where the content can be represented individually. In Qt \WebKit, QWebFrame represents a frame inside a web page. Each QWebPage object contains at least one frame, the main frame, obtained using QWebPage::mainFrame(). Additional frames will be created for the HTML \c element, which defines the appearance and contents of a single frame, or the \c