33 lines
853 B
C++
33 lines
853 B
C++
|
#include "frmRegister.h"
|
|||
|
#include <QtWidgets/QApplication>
|
|||
|
#include <QTextCodec>
|
|||
|
#include <QSharedMemory>
|
|||
|
#include <QFile>
|
|||
|
#include <QTextStream>
|
|||
|
|
|||
|
int main(int argc, char *argv[])
|
|||
|
{
|
|||
|
QApplication a(argc, argv);
|
|||
|
//<2F><><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
QTextCodec::setCodecForLocale(QTextCodec::codecForName("GB2312"));
|
|||
|
QSharedMemory memory("QMacVisual");
|
|||
|
if (!memory.create(1))
|
|||
|
{
|
|||
|
return 0;
|
|||
|
}
|
|||
|
//<2F><><EFBFBD>ij<EFBFBD><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|||
|
a.setWindowIcon(QIcon(":/Bitmaps/app.ico"));
|
|||
|
QApplication::setAttribute(Qt::AA_Use96Dpi);
|
|||
|
//Opengl<67><6C>Ⱦ<EFBFBD><C8BE>ʽ
|
|||
|
QApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
|||
|
QApplication::setAttribute(Qt::AA_UseOpenGLES);
|
|||
|
QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
|||
|
QFile fi(":/res/default.qss");
|
|||
|
fi.open(QIODevice::ReadOnly);
|
|||
|
QTextStream stream(&fi);
|
|||
|
a.setStyleSheet(stream.readAll());
|
|||
|
fi.close();
|
|||
|
frmRegister w;
|
|||
|
return a.exec();
|
|||
|
}
|