This commit is contained in:
2026-03-03 16:10:38 +01:00
parent 35aae3b707
commit 5f0b7d3dc8
16 changed files with 766 additions and 334 deletions

View File

@@ -13,7 +13,16 @@ class WebviewWindow : public QMainWindow
private:
Rktwebview_qt *_container;
WebViewQt *_view;
QTimer _process_js_events;
QMainWindow *_devtools;
QTimer _resize_timer;
QTimer _move_timer;
int _x;
int _y;
int _w;
int _h;
bool _must_close;
public slots:
void processJsEvents();
@@ -22,14 +31,31 @@ protected:
void closeEvent(QCloseEvent *evt);
public:
void addView(WebViewQt *v, Rktwebview_qt *c);
void closeView();
public:
void addView(WebViewQt *v, Rktwebview_qt *c);
WebViewQt *view();
public:
void runJs(const QString &js);
void openDevTools();
public:
explicit WebviewWindow(QWidget *parent = nullptr);
private slots:
void triggerResize();
void triggerMove();
signals:
// QWidget interface
protected:
void moveEvent(QMoveEvent *event);
void resizeEvent(QResizeEvent *event);
void showEvent(QShowEvent *event);
void hideEvent(QHideEvent *event);
};
#endif // WEBVIEWWINDOW_H