[ACCEPTED]-problem with import qt in python-python

Accepted answer
Score: 12

The current PyQt comes in the PyQt4 package, which 9 has several modules. You almost always need 8 to start with:

from PyQt4 import QtCore
from PyQt4 import QtGui

Add other imports as necessary 7 if you need additional sub-modules of PyQt 6 (like QtNetwork, QtSql etc).


Tip for the future: find the 5 lib/site-packages library of your Python installation and 4 look at the packages in there if you're 3 not sure about the name after installing.

Also, arm 2 yourself with a PyQt tutorial - any decent 1 one covers this in the first few paragraphs.

Score: 3

import PyQt4 works for me fine.

0

More Related questions