From f9afa5e0aae19ec0fd202c0e00171b464408b202 Mon Sep 17 00:00:00 2001 From: Syping Date: Fri, 20 Sep 2019 00:43:20 +0200 Subject: [PATCH] disable custom theme --- src/luaengineapp/main.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/luaengineapp/main.cpp b/src/luaengineapp/main.cpp index dd65a99..2c65c6c 100644 --- a/src/luaengineapp/main.cpp +++ b/src/luaengineapp/main.cpp @@ -21,18 +21,19 @@ #include #include -#ifdef _WIN32 +#ifdef Q_OS_WIN #include "windows.h" #endif int main(int argc, char *argv[]) { + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); QApplication a(argc, argv); -#ifdef _WIN32 +#ifdef Q_OS_WIN QApplication::setStyle(new LuaEngineStyle()); #endif -#ifdef _WIN32 +#ifdef Q_OS_WIN #if QT_VERSION >= 0x050400 if (QSysInfo::windowsVersion() >= 0x0080) { @@ -47,15 +48,6 @@ int main(int argc, char *argv[]) #endif #endif -#ifdef _WIN32 - QFile *luaEngineStyleFile = new QFile(":/luaenginestyle/luaenginestyle.qss"); - if (luaEngineStyleFile->open(QFile::ReadOnly)) - { - a.setStyleSheet(QString::fromUtf8(luaEngineStyleFile->readAll())); - } - delete luaEngineStyleFile; -#endif - QFile luaScript(":/lua/edit.lua"); LuaEngineGui luaEngineGui;