Skip to content

Commit

Permalink
Fix QT_STYLE_OVERRIDE bug in environments with style override Qt libr…
Browse files Browse the repository at this point in the history
…aries

Signed-off-by: Martin Ribelotta <[email protected]>
  • Loading branch information
martinribelotta committed Apr 7, 2017
1 parent 7ccbc09 commit 7a29d79
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@
#include <QMessageBox>
#include <configdialog.h>

#ifdef Q_OS_LINUX
#include <stdlib.h>
#endif

int main(int argc, char *argv[])
{
#ifdef Q_OS_LINUX
// FIXME If QT_STYLE_OVERRIDE is set, Qt plugin platform cannot work correctly
::unsetenv("QT_STYLE_OVERRIDE");
#endif

QApplication a(argc, argv);
QCoreApplication::setOrganizationName("none");
QCoreApplication::setOrganizationDomain("none.unknown.com");
QCoreApplication::setApplicationName("embedded IDE");

a.setWindowIcon(QIcon(":/images/embedded-ide.png"));
a.setStyleSheet([]() -> QString {
QFile f(":/style.css");
Expand Down

0 comments on commit 7a29d79

Please sign in to comment.