/* ============================================================ * The rekonq project * ============================================================ * SPDX-License-Identifier: GPL-3.0-only * Copyright (C) 2022 aqua * ============================================================ * Description: Qt WebEngine View * ============================================================ */ #include "webview.h" #include #include WebView::WebView(const QUrl &url, QWidget *parent) : rView(url, parent), view(new QWebEngineView(this)) { auto *layout = new QVBoxLayout; layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(view); setLayout(layout); connect(view, &QWebEngineView::iconChanged, this, [this](const QIcon &icon) { emit iconChanged(icon); }); connect(view, &QWebEngineView::urlChanged, this, [this](const QUrl &url) { emit urlChanged(url); }); connect(view, &QWebEngineView::titleChanged, this, [this](const QString &title) { emit titleChanged(title); }); view->load(url); }