Hang on, the python namespace of the modules is PyQt4 , not qt4. Your import statement should be something like Code: from PyQt4 import QtCore,QtGui
from PyQt4 import QtCore,QtGui