Qt-Advanced-Docking-System/demo/main.cpp
2017-03-12 21:41:50 +01:00

28 lines
473 B
C++

#include <QString>
#include <QFile>
#include <QApplication>
#include "mainwindow.h"
static void initStyleSheet(QApplication& a)
{
QFile f(":ads/stylesheets/default-windows2.css");
if (f.open(QFile::ReadOnly))
{
const QByteArray ba = f.readAll();
f.close();
a.setStyleSheet(QString(ba));
}
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setQuitOnLastWindowClosed(true);
initStyleSheet(a);
MainWindow mw;
mw.show();
return a.exec();
}