mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现启动splash画面,实现天历史数据的处理和数据库存贮
This commit is contained in:
22
src/main.cpp
22
src/main.cpp
@@ -30,8 +30,7 @@
|
||||
#include <string>
|
||||
#include "DataStruct.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QtWebEngineWidgets/QWebEngineView>
|
||||
#include "qt/MainWeb.h"
|
||||
|
||||
#define wsa rlwsa
|
||||
void rlSocketTest()
|
||||
@@ -159,23 +158,8 @@ int main(int argc, char** argv)
|
||||
}).detach();
|
||||
|
||||
QApplication qapp(argc, argv);
|
||||
|
||||
QMainWindow mainWin;
|
||||
mainWin.setWindowTitle("光储充站监控与运营管理平台");
|
||||
mainWin.setGeometry(0, 0, 1920, 1080);
|
||||
QWebEngineView webView;
|
||||
webView.setGeometry(0, 0, 1920, 1080);
|
||||
// 默认设置透明, 解决加载时的白屏闪烁
|
||||
webView.page()->setBackgroundColor(Qt::transparent);
|
||||
webView.setContextMenuPolicy(Qt::NoContextMenu);
|
||||
webView.load(QUrl(Config::option.webSrvUrl.c_str()));
|
||||
//webView.load(QUrl("file:///assets/html/main.html"));
|
||||
//connect(wWebView.get(), &QWebEngineView::loadFinished, this, &MyWidget::slotLoadFinished);
|
||||
//std::string htmlContent = "HelloWorld";
|
||||
//webView->setHtml(htmlContent.c_str(), QUrl("file:///assets/html/"));
|
||||
webView.show();
|
||||
mainWin.setCentralWidget(&webView);
|
||||
|
||||
qapp.setWindowIcon(QIcon("./yhicon.ico"));
|
||||
MainWeb mainWin;
|
||||
mainWin.show();
|
||||
qapp.exec();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user