2025-09-09 19:26:05 +08:00
|
|
|
#include <QMainWindow>
|
|
|
|
|
#include <QtWebEngineWidgets/QWebEngineView>
|
|
|
|
|
#include <QSplashScreen>
|
2025-09-10 20:10:51 +08:00
|
|
|
#include <QLabel>
|
2025-09-13 17:28:35 +08:00
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <QHBoxLayout>
|
2025-09-09 19:26:05 +08:00
|
|
|
|
2025-09-16 19:38:46 +08:00
|
|
|
class MainWeb : public QMainWindow
|
2025-09-09 19:26:05 +08:00
|
|
|
{
|
2025-09-10 20:10:51 +08:00
|
|
|
Q_OBJECT
|
2025-09-09 19:26:05 +08:00
|
|
|
public:
|
|
|
|
|
MainWeb();
|
2025-09-13 17:28:35 +08:00
|
|
|
void initWebview();
|
|
|
|
|
void mySplash();
|
|
|
|
|
void showDevTools();
|
2025-09-09 19:26:05 +08:00
|
|
|
|
2025-09-13 17:28:35 +08:00
|
|
|
bool event(QEvent* e);
|
|
|
|
|
void keyPressEvent(QKeyEvent* event);
|
|
|
|
|
|
|
|
|
|
public:
|
2025-09-14 16:00:30 +08:00
|
|
|
QLabel labelWebErr;
|
|
|
|
|
|
2025-09-09 19:26:05 +08:00
|
|
|
QWebEngineView webView;
|
2025-09-13 17:28:35 +08:00
|
|
|
QWebEngineView devTools;
|
|
|
|
|
|
2025-09-14 16:00:30 +08:00
|
|
|
|
|
|
|
|
|
2025-09-13 17:28:35 +08:00
|
|
|
std::shared_ptr<QSplashScreen> splash;
|
2025-09-10 20:10:51 +08:00
|
|
|
QLabel label1;
|
|
|
|
|
QLabel labelProgress;
|
2025-09-13 17:28:35 +08:00
|
|
|
|
|
|
|
|
QLabel labelFullscreen;
|
|
|
|
|
QPushButton btnFullscreen;
|
|
|
|
|
bool isFullscreen = false;
|
|
|
|
|
|
|
|
|
|
QHBoxLayout* layout = NULL;
|
2025-09-09 19:26:05 +08:00
|
|
|
};
|