qt_demoe/ui/uidemo09/main.cpp

30 lines
652 B
C++
Raw Normal View History

2021-11-17 07:33:19 +00:00
#include "frmmain.h"
#include "appinit.h"
#include "quihelper.h"
int main(int argc, char *argv[])
{
2022-05-01 03:38:30 +00:00
QUIHelper::initMain();
2021-11-17 07:33:19 +00:00
QApplication a(argc, argv);
AppInit::Instance()->start();
QUIHelper::setFont();
QUIHelper::setCode();
//加载样式表
2021-12-15 05:21:29 +00:00
QFile file(":/qss/blacksoft.css");
2021-11-17 07:33:19 +00:00
if (file.open(QFile::ReadOnly)) {
QString qss = QLatin1String(file.readAll());
QString paletteColor = qss.mid(20, 7);
qApp->setPalette(QPalette(paletteColor));
qApp->setStyleSheet(qss);
file.close();
}
frmMain w;
QUIHelper::setFormInCenter(&w);
w.show();
return a.exec();
}