Custom Theme only for Windows

This commit is contained in:
Syping 2018-08-31 05:49:15 +02:00
parent 3aa716a1c1
commit a5a631c748

View file

@ -28,7 +28,9 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
#ifdef _WIN32
QApplication::setStyle(new LuaEngineStyle()); QApplication::setStyle(new LuaEngineStyle());
#endif
#ifdef _WIN32 #ifdef _WIN32
#if QT_VERSION >= 0x050400 #if QT_VERSION >= 0x050400
@ -45,12 +47,14 @@ int main(int argc, char *argv[])
#endif #endif
#endif #endif
#ifdef _WIN32
QFile *luaEngineStyleFile = new QFile(":/luaenginestyle/luaenginestyle.qss"); QFile *luaEngineStyleFile = new QFile(":/luaenginestyle/luaenginestyle.qss");
if (luaEngineStyleFile->open(QFile::ReadOnly)) if (luaEngineStyleFile->open(QFile::ReadOnly))
{ {
a.setStyleSheet(QString::fromUtf8(luaEngineStyleFile->readAll())); a.setStyleSheet(QString::fromUtf8(luaEngineStyleFile->readAll()));
} }
delete luaEngineStyleFile; delete luaEngineStyleFile;
#endif
QFile luaScript(":/lua/edit.lua"); QFile luaScript(":/lua/edit.lua");