. . Python QPixmap.toImage, . PyQt5.QtGui.QPixmap . QPixmap.toImage 2.. PyQt5 Tutorial(7) hide, show, auto fit window size PyQt5 Tutorial(8) QTimer, QlcdNumber PyQt5 Tutorial(9) Use QCalendar to create a calendar component PyQt5 Tutorial(10) Use keyboard to enter command and listen mouse clicked PyQt5 Tutorial(11) Use QColorDialog to let user select color. May 15, 2022 &183; I use a custom paintEvent() drawing QPixmap, and this happens when I use scaled() to resize my pixmap. I noticed the icon does not have the jagged look with the built-in setIcon() and setIconSize in QPushButton. So I know. QtWidgets import QApplication, QLabel from PyQt5. QtGui import QImage, QPixmap import fitz app QApplication (sys. argv) render pdf with PyMuPDF document fitz. open ("test.pdf") page document 0 short for loadPage(0) pix page. getPixmap (alpha False) convert to QImage image QImage (pix. samples, pix. width, pix. height, pix.