Reputation: 699
from PyQt5 import QtCore, QtGui, QtWidgets,QtPrintSupport
from PyQt5 import QPrinter
import sqlite3
when running this error shows: ImportError: cannot import name 'QPrinter' from 'PyQt5' any help please
Upvotes: 1
Views: 1932
Reputation: 46
QPrinter
is a class inside QtPrintSupport
, instead import like this:
from PyQt5.QtPrintSupport import QPrinter
Upvotes: 3