Added stylesheet, demo docs etc.

This commit is contained in:
2025-12-17 13:11:26 +01:00
parent 4c5e42fcfd
commit 08d6c593da
17 changed files with 530 additions and 160 deletions

View File

@@ -30,6 +30,7 @@
#include <QApplication>
#include <QMetaEnum>
#include <QFile>
// main.cpp
#include <QCoreApplication>
@@ -65,6 +66,22 @@ if (ok) {
#include <QThread>
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;
}
// 2. Datei öffnen und lesen
int main(int argc, char *argv[])
{
auto x = BC::ID::Motor_Status_Main;
@@ -80,8 +97,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
BCMainWindow w;
w.show();
setApplicationStyleSheet( ":/BionxControl.qss"_L1 );
QMetaEnum metaEnum = QMetaEnum::fromType<BC::ID>();
@@ -103,6 +119,9 @@ int main(int argc, char *argv[])
//myMgr.loadXml();
BCMainWindow w;
w.show();
return app.exec();
}