pycharm: this application failed because no QT plugin platform could be initialised


hello, as a newby interested in QGis programming with phyton (for plugins, standalone Qgis apps)

I tried Pycharm (edu version) as an QGis IDE.

Then doing the following simple  test: (from

"from qgis.core import QgsApplication
from PyQt4.QtGui import QDialog

app = QgsApplication([], GUIEnabled)

dlg = QDialog()


changing a bit:
(I'm using QGis 3.4, Python3.7, which use PyQt5 I think)

from PyQt5.QtGui import QDialog
from PyQt5.QtWidgets import QtGui
from PyQt5.QtGui import QDialog
or any other similar combination I could think off

over and over the following  message:

"this application failed because no QT plugin platform could be initialised"

or sometimes:

"could not find QtdDialog"

Same message (the first message) in Eclipse IDE also.

No solution found afters 4-5 hours searching on internet - strange because looks like a quite basic fault message to me,
with probably (hopefully) a straightforward solution ?
(no solution on the net maybe because I use the newest QGis version ?: most posts are older..2017 or earlier..)

I added to pythonpath and path variables a lot (i mean a lot) of additional paths...

Thanks for any suggestion.

Please remember I'm a newbie not aan IT-wizard.




1 comment


If you are having the same problem outside of PyCharm, then it means that the problem is not related to PyCharm and you should solve the problem in the system/environment or your code.

Tip: You could try reinstalling Qt, maybe that could help.


Please sign in to leave a comment.