-
This commit is contained in:
@@ -11,20 +11,27 @@
|
||||
#include <QWebEngineScriptCollection>
|
||||
#include <QWebEngineScript>
|
||||
#include <QMoveEvent>
|
||||
#include <QWindow>
|
||||
|
||||
|
||||
WebviewWindow::WebviewWindow(QWidget *parent)
|
||||
WebviewWindow::WebviewWindow(WebviewWindow *parent)
|
||||
: QMainWindow{parent}
|
||||
{
|
||||
_view = nullptr;
|
||||
_must_close = false;
|
||||
|
||||
_devtools = nullptr;
|
||||
_parent = parent;
|
||||
|
||||
_window_created = false;
|
||||
_moved = 0;
|
||||
_resized = 0;
|
||||
|
||||
if (parent != nullptr) {
|
||||
setWindowModality(Qt::WindowModality::WindowModal);
|
||||
setWindowFlag(Qt::WindowType::Dialog, true);
|
||||
}
|
||||
|
||||
connect(&_resize_timer, &QTimer::timeout, this, &WebviewWindow::triggerResize);
|
||||
connect(&_move_timer, &QTimer::timeout, this, &WebviewWindow::triggerMove);
|
||||
}
|
||||
@@ -227,6 +234,7 @@ void WebviewWindow::triggerResize()
|
||||
void WebviewWindow::showEvent(QShowEvent *event)
|
||||
{
|
||||
_window_created = true;
|
||||
|
||||
EventContainer show("show");
|
||||
_container->triggerEvent(_view->id(), show);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user