diff options
Diffstat (limited to 'src/widgets/DevtoolsWindow.hpp')
| -rw-r--r-- | src/widgets/DevtoolsWindow.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/widgets/DevtoolsWindow.hpp b/src/widgets/DevtoolsWindow.hpp new file mode 100644 index 0000000..b277c89 --- /dev/null +++ b/src/widgets/DevtoolsWindow.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include <QMainWindow> +#include <QWebEngineProfile> +#include <QWebEngineView> +#include <QtCore> + +#include "utils.hpp" + +class DevtoolsWindow : public QMainWindow { + Q_OBJECT + +public: + DevtoolsWindow(QWebEngineProfile *profile, QWidget *parent = nullptr, + Qt::WindowFlags flags = Qt::WindowFlags()) + : QMainWindow(parent, flags) { + webengineview = new QWebEngineView(profile, this); + this->setCentralWidget(webengineview); + } + + DELEGATE(webengineview, page, page) + +signals: + void closed(); + +protected: + void closeEvent(QCloseEvent * /* event */) override { emit closed(); } + +private: + QWebEngineView *webengineview; +}; |
