program crashes when setting zoom factor
Solved
Qt for Python
-
Hello:
I am displaying a PDF in QPdfView. I have two buttons to zoom in and zoom out. Each time I press "zoom in" I multiply the current zoom factor by 1.1. The function is called by the button push event.
@Slot() def __zoomIn(self): self.setZoomMode(QPdfView.ZoomMode.Custom) new_zoom_factor = self.zoomFactor() * 1.1 self.setZoomFactor(new_zoom_factor)
After I get to about a zoom factor of 6, the app hangs and crashes. Is there a maximum zoom factor I don't know about? is it because I'm setting zoom mode over and over?
Dan
-
-
Ok, I have given up on QPdfView. It is buggy, not well documented, and has limited functionality. I'm in the process of porting to PyMuPDF.
@dullfig I was thinking that can't you extend the class QPDF using PyMuPDF. MIght be able to solve your issue.