1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-03-15 18:49:52 +08:00
Qt-Advanced-Docking-System/AdvancedDockingSystemDemo/src/main.cpp

31 lines
620 B
C++
Raw Normal View History

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