41 lines
783 B
C++
41 lines
783 B
C++
|
|
|
|
#include "mainwindow.h"
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QApplication>
|
|
#include <QMetaEnum>
|
|
#include <QFile>
|
|
#include <QLabel>
|
|
#include <QProgressBar>
|
|
|
|
// main.cpp
|
|
#include <QCoreApplication>
|
|
#include <QTimer>
|
|
#include <QDebug>
|
|
|
|
bool setApplicationStyleSheet( QAnyStringView path )
|
|
{
|
|
QFile styleFile( path.toString() );
|
|
if (styleFile.open(QIODevice::ReadOnly | QIODevice::Text))
|
|
{
|
|
QString style = styleFile.readAll();
|
|
qApp->setStyleSheet(style);
|
|
styleFile.close();
|
|
return true;
|
|
}
|
|
|
|
qWarning() << "Konnte Stylesheet nicht laden:" << styleFile.errorString();
|
|
return true;
|
|
}
|
|
|
|
int main (int argc, char *argv[])
|
|
{
|
|
QApplication a (argc, argv);
|
|
setApplicationStyleSheet( u":gui_test.qss" );
|
|
MainWindow w;
|
|
w.show ();
|
|
return a.exec ();
|
|
}
|