Fix Stylesheet is not applied when the app is installed on Linux #139

This commit is contained in:
Alexandre Quessy
2015-10-27 10:31:40 -04:00
parent 9dd39b5d40
commit 3f9176974b
3 changed files with 6 additions and 6 deletions
+4 -6
View File
@@ -92,7 +92,10 @@ int main(int argc, char *argv[])
#endif // USING_QT_5
if (! QGLFormat::hasOpenGL())
{
qFatal("This system has no OpenGL support.");
return 1;
}
// Create splash screen.
QPixmap pixmap(":/mapmap-splash");
@@ -106,11 +109,6 @@ int main(int argc, char *argv[])
bool FORCE_FRENCH_LANG = false;
// set_language_to_french(app);
if (FORCE_FRENCH_LANG) // XXX FIXME this if seems wrong
{
std::cerr << "This system has no OpenGL support" << std::endl;
return 1;
}
// Let splash for at least one second.
I::sleep(1);
@@ -123,7 +121,7 @@ int main(int argc, char *argv[])
app.setFont(QFont(":/base-font", 10, QFont::Bold));
// Load stylesheet.
QFile stylesheet("mapmap.qss");
QFile stylesheet(":/stylesheet");
stylesheet.open(QFile::ReadOnly);
app.setStyleSheet(QLatin1String(stylesheet.readAll()));
+2
View File
@@ -46,6 +46,8 @@
<file alias="base-font">resources/fonts/HelveticaNeueLTPro-Bd.otf</file>
<file alias="test-signal">resources/images/test-signal/test-signal.svg</file>
<file alias="stylesheet">resources/qss/mapmap.qss</file>
</qresource>
</RCC>