#include "HelpBrowser.h" #include HelpBrowser::HelpBrowser(QUrl const &url, QWidget *parent):QMainWindow(parent) { _browser = new QWebEngineView(this); _browser->load(url); QToolBar *tb = addToolBar(tr("Main toolbar")); QAction *back = new QAction(tr("Back"), tb); connect(back, &QAction::triggered, _browser, &QWebEngineView::back); tb->addAction(back); QAction *forward = new QAction(tr("Forward"), tb); connect(forward, &QAction::triggered, _browser, &QWebEngineView::forward); tb->addAction(forward); setCentralWidget(_browser); } void HelpBrowser::closeEvent(QCloseEvent *e) { QMainWindow::closeEvent(e); deleteLater(); }