diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b331da5..ce117ee 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -19,6 +19,7 @@ #include <QAbstractTextDocumentLayout> #include <QDateTime> #include <QPainter> +#include <QFile> #include <sys/types.h> #include <sys/socket.h> @@ -68,6 +69,14 @@ MainWindow::MainWindow(bool primary, int screen, const QRect &screenRect, QWidge createClock(); createNewsWindow(); + if (QFile::exists(CONFIG_QSS_FILE)) { + QFile qss(CONFIG_QSS_FILE); + if (qss.open(QFile::ReadOnly)) { + this->setStyleSheet(qss.readAll()); + } else { + qDebug() << "Cannot open" << CONFIG_QSS_FILE << "for reading"; + } + } setGeometry(screenRect); } |