Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. program crashes when setting zoom factor

program crashes when setting zoom factor

Scheduled Pinned Locked Moved Solved Qt for Python
3 Posts 2 Posters 246 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dullfig
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dullfig
      wrote on last edited by
      #2

      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.

      V 1 Reply Last reply
      0
      • D dullfig has marked this topic as solved on
      • D dullfig

        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.

        V Offline
        V Offline
        VIDYUL SHAH
        wrote on last edited by
        #3

        @dullfig I was thinking that can't you extend the class QPDF using PyMuPDF. MIght be able to solve your issue.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved