Splash image logo added

parent ce1e470a
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</head> </head>
<body> <body>
<div id="loading"> <div id="loading">
<img src="img/logo.png"></img>
<h3>Loading...</h3> <h3>Loading...</h3>
</div> </div>
</body> </body>
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <QApplication> #include <QApplication>
#include <QFile> #include <QFile>
#include <QUrl> #include <QUrl>
#include <QDir>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
...@@ -50,6 +51,8 @@ int main(int argc, char *argv[]) ...@@ -50,6 +51,8 @@ int main(int argc, char *argv[])
QFile loadinghtml("gui/splash.html"); QFile loadinghtml("gui/splash.html");
loadinghtml.open(QIODevice::ReadOnly); loadinghtml.open(QIODevice::ReadOnly);
QString splashFile = QString::fromUtf8(loadinghtml.readAll().constData());
QUrl baseUrl = QUrl::fromLocalFile(QDir::current().absoluteFilePath("gui/dummy.html"));
splashwin.setWindowFlags(Qt::FramelessWindowHint); splashwin.setWindowFlags(Qt::FramelessWindowHint);
QPalette palette = splashwin.palette(); QPalette palette = splashwin.palette();
...@@ -59,7 +62,7 @@ int main(int argc, char *argv[]) ...@@ -59,7 +62,7 @@ int main(int argc, char *argv[])
splashwin.setAttribute(Qt::WA_OpaquePaintEvent, false); splashwin.setAttribute(Qt::WA_OpaquePaintEvent, false);
//splashwin.setGeometry(0, 0, QApplication::desktop()->size().width(), QApplication::desktop()->size().height()); //splashwin.setGeometry(0, 0, QApplication::desktop()->size().width(), QApplication::desktop()->size().height());
splashwin.setHtml(QString::fromUtf8(loadinghtml.readAll().constData()), QUrl()); splashwin.setHtml(splashFile, baseUrl);
splashwin.resize(300,200); splashwin.resize(300,200);
splashwin.show(); splashwin.show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment