2015-12-09 19:21:38 +08:00
|
|
|
#include <QString>
|
2016-02-15 21:25:12 +08:00
|
|
|
#include <QFile>
|
2015-12-09 19:21:38 +08:00
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
2016-03-08 21:24:33 +08:00
|
|
|
static void initStyleSheet(QApplication& a)
|
2015-12-09 19:21:38 +08:00
|
|
|
{
|
2016-03-08 21:24:33 +08:00
|
|
|
QFile f(":/stylesheets/default-windows.css");
|
|
|
|
// QFile f(":/stylesheets/modern-windows.css");
|
|
|
|
// QFile f(":/stylesheets/vendor-partsolutions.css");
|
2016-02-15 21:25:12 +08:00
|
|
|
if (f.open(QFile::ReadOnly))
|
|
|
|
{
|
|
|
|
QByteArray ba = f.readAll();
|
|
|
|
f.close();
|
|
|
|
a.setStyleSheet(QString(ba));
|
|
|
|
}
|
2016-03-08 21:24:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
//Q_INIT_RESOURCE(ads);
|
|
|
|
a.setQuitOnLastWindowClosed(true);
|
|
|
|
initStyleSheet(a);
|
2016-02-15 21:25:12 +08:00
|
|
|
|
|
|
|
MainWindow mw;
|
|
|
|
mw.show();
|
|
|
|
return a.exec();
|
|
|
|
}
|