i was trying to use a QString in the QGIS Python Console.
from PyQt4.QtCore import QString
but it says:
ImportError: cannot
I've not used QGIS, but this is probably because the PyQt has been switched to the new API version 2 (see http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html). In the new API, any Qt function returning or taking a QString takes a Python native string instead. The new API is much more convenient and is the default for PyQt5.