src/main.cpp

changeset 14
8a304c898a75
parent 6
f8474f2c5db9
child 15
c58b82549713
--- a/src/main.cpp	Wed Feb 16 11:51:53 2022 +0100
+++ b/src/main.cpp	Wed Feb 16 16:29:42 2022 +0100
@@ -20,9 +20,6 @@
 #include <QDate>
 #include <QMessageBox>
 
-//#include <QLocale>
-//#include <QTranslator>
-
 #include "bmsapp.h"
 #include "config.h"
 
@@ -38,8 +35,19 @@
 #endif
     );
     app.setApplicationVersion(VERSIONSTRING);
+//    app.setStyle("oxygen");
     app.setOrganizationName("mbse");
 
+    QFile f(":/qdarkstyle/theme/style.qss");
+
+    if (!f.exists())   {
+	printf("Unable to set stylesheet, file not found\n");
+    } else {
+	f.open(QFile::ReadOnly | QFile::Text);
+	QTextStream ts(&f);
+	qApp->setStyleSheet(ts.readAll());
+    }
+
     /* Setup user ini format */
     QSettings::setDefaultFormat(QSettings::IniFormat);
 

mercurial