#include "mainwindow.h" #include #include #include #include #include #include // main.cpp #include #include #include 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 (); }