-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (26 loc) · 841 Bytes
/
main.cpp
File metadata and controls
29 lines (26 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "mainwindow.h"
#include <QApplication>
#include <time.h>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qsrand( time(NULL) );
a.setOrganizationName("Geek-Ranch");
a.setOrganizationDomain("geek-ranch.org");
a.setApplicationName("GoGoGo");
a.setAttribute( Qt::AA_EnableHighDpiScaling, true);
//QFile file(":/stylesheet.css");//not sure why broken
//QFile file("/home/g/prog/GoGoGo/stylesheet.css");
QFile file(":/stylesheet.css");
if(file.open(QIODevice::ReadOnly | QIODevice::Text))
{
a.setStyleSheet(file.readAll());
file.close();
}else{
qDebug() <<"Error opening stylesheet: " << file.errorString();
}
MainWindow w;
w.show();
w.connect(&a, SIGNAL(aboutToQuit()), &w, SLOT(on_actionQuit_triggered()));
return a.exec();
}