Skip to content

Commit

Permalink
fmk - playing with stylesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Sep 26, 2019
1 parent 01b13d5 commit d6dc2ca
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,40 @@ int main(int argc, char *argv[])

w.show();

#ifdef Q_OS_WIN
QFile file(":/styleCommon/stylesheetWIN.qss");
#endif

QFile file(":/styleCommon/common_experimental.qss");
QFile fileEEUQ(":/styles/stylesheet_eeuq.qss");
#ifdef Q_OS_MACOS
QFile file(":/styleCommon/stylesheetMAC.qss");
#endif

if(file.open(QFile::ReadOnly) && fileEEUQ.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(file.readAll());
QString styleSheetEEUQ = QLatin1String(fileEEUQ.readAll());
#ifdef Q_OS_LINUX
QFile file(":/styleCommon/stylesheetMAC.qss");
#endif

a.setStyleSheet(styleSheet+styleSheetEEUQ);

if(file.open(QFile::ReadOnly)) {
a.setStyleSheet(file.readAll());
file.close();
fileEEUQ.close();
} else {
qDebug() << "could not open stylesheet";
}

/*
QFile fileCommon(":/styleCommon/common_experimental.qss");
QFile fileEEUQ(":/styles/stylesheet_eeuq.qss");
if(fileCommon.open(QFile::ReadOnly) && fileEEUQ.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(fileCommon.readAll());
QString styleSheetEEUQ = QLatin1String(fileEEUQ.readAll());
// a.setStyleSheet(styleSheet+styleSheetEEUQ);
a.setStyleSheet(styleSheet);
fileCommon.close();
fileEEUQ.close();
}
*/
/*
theInputApp->setStyleSheet("QComboBox {background: #E0E0E0;} \
QGroupBox {font-weight: bold;}\
Expand Down

0 comments on commit d6dc2ca

Please sign in to comment.