How to display PDF with python-poppler-qt4?
问题 I have downloaded and installed python-poppler-qt4 and I am now trying out a simple Qt application to display a PDF page. I've followed what I've been able to get from the web, i.e. convert the PDF to a QImage, then to a QPixMap, but it doesn't work (all I get is a small window with no visible content). I may have failed at some point ( QImage.width() returns the width I have input, QPixMap.width() returns 0). Here is the code: #!/usr/bin/env python import sys from PyQt4 import QtGui, QtCore