#include #include #include "ogcommandlne.h" class MainWindow; class OGWebPage : public QWebEnginePage { public: OGWebPage(QObject *parent) : QWebEnginePage(parent) { qDebug() << "OGWebPage constructed!"; } virtual bool acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame); virtual QWebEnginePage *createWindow(QWebEnginePage::WebWindowType type); void setMainWindow(MainWindow *mw) { m_mainWindow = mw; } private: MainWindow *m_mainWindow; };