--- demo.py
+++ demo.py
@@ -1,5 +1,5 @@
import sys
-from PyQt5 import QtGui
+from PyQt5 import QtGui, QtWidgets
import popplerqt5
usage = """
@@ -15,7 +15,7 @@ Usage:
def pdf_view(filename):
"""Return a Scrollarea showing the first page of the specified PDF file."""
- label = QtGui.QLabel()
+ label = QtWidgets.QLabel()
doc = popplerqt5.Poppler.Document.load(filename)
doc.setRenderHint(popplerqt5.Poppler.Document.Antialiasing)
@@ -26,15 +26,15 @@ def pdf_view(filename):
label.setPixmap(QtGui.QPixmap.fromImage(image))
- area = QtGui.QScrollArea()
+ area = QtWidgets.QScrollArea()
area.setWidget(label)
area.setWindowTitle(filename)
return area
def main():
- app = QtGui.QApplication(sys.argv)
- argv = QtGui.QApplication.arguments()
+ app = QtWidgets.QApplication(sys.argv)
+ argv = QtWidgets.QApplication.arguments()
if len(argv) < 2:
sys.stderr.write(usage)
sys.exit(2)