Where is this warning being raised 'QApplication: invalid style override passed, ignoring it.'?

The cause for this message is that the environment variable QT_STYLE_OVERRIDE is set on your system to a value not supported by your Qt installation. You can check this with

    sh-prompt> set | grep QT

To fix this warning, you can either change the variable in /etc/profile or $HOME/.bashrc, or -if only one program is affected- start the program with

    QT_STYLE_OVERRIDE="" program

Unsetting the varible with qputenv in your program code (as Harvey suggested) will have the side effect that style preferences are ignored by your application even on systems that support it.


This problem comes from qt 5.9.2 and pyqt 5.9.2. This problem is known to Anaconda team and they are ignoring it because it primarily comes from qt.

I got this error for anaconda-navigator (Anaconda3-5.2.0-Linux-x86_64) and this caused my Spyder (v3.2.8) IDE for Python 3.6 getting invisible. Downgrading qt and pyqt solved the problem.

To downgrade, type in console:

conda install pyqt=5.6

Note: In case, your conda is not updated, you need to update conda before running the above command. To update conda run:

conda update -n base conda

Hope this will solve your problem too.