How to debug PyQt4-based application?

4.8k Views Asked by At

I have a simple PyQt4-based application. I want to debug it with PyCharm.

Alas, I it crashes with an error:

Process finished with exit code -1073740771 (0xC000041D)

Here is the code:

from PyQt4 import QtGui, QtCore

app = QtGui.QApplication([])
win = QtGui.QMainWindow() # Breakpoint is here
win.show()
QtGui.QApplication.instance().exec_()

Cannot you tell me, what should I do to cope with it?

2

There are 2 best solutions below

1
On

I found in File > Settings > Build, Execution, Deployment > Python Debugger that PyQt box was checked. Unchecking it solves the problem. To solve the problem for every program, do the same in File > Default settings > (...).

0
On

Removing PySide from the virtualenv solved the problem for me.