oiyio
oiyio

Reputation: 5935

ImportError: cannot import name QtGui

I installed Qt5.3(32 bit) installer on my linux 32 bit computer.

- When i run the final version of the python file with python3.2, it gives the error:

Traceback (most recent call last):
  File "outFile_ui.py", line 12, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: cannot import name QtGui

- Why i am taking this error? I think the problem is at nonmatching version,or installation etc. But i installed again and again. Nothing changed unfortunately. I searched all about the problem on the web. Similar problems exist,however none of them worked for me.

Upvotes: 0

Views: 6231

Answers (1)

oiyio
oiyio

Reputation: 5935

After converting .ui to .py code, it is required to add a main function. After main function is added properly, it runs perfectly.

Upvotes: 1

Related Questions