Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. zoom factor is not updated when zoom mode is set to FitInView and FitToWidth in QPdfView
Forum Updated to NodeBB v4.3 + New Features

zoom factor is not updated when zoom mode is set to FitInView and FitToWidth in QPdfView

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 418 Views 1 Watching
  • 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.
  • JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on last edited by JoeCFD
    #1

    QPdfView has a nice feature to fit pages to width or height with zoom mode(FitToWidth and FitInView). However, zoom factor is not updated after zoom mode is changed to FitInView and FitToWidth. Then, the old zoom factor is used when zoom mode is switched back to CustomZoom.

    For example, at start-up, set zoom factor to 100% and zoom out to 50%.
    Switch to FitToWidth. Zoom factor is still 50%. Then change zoom mode to CustomZoom and zoom out 50%, zoom factor changes to 0.5 * 0.5 = 0.25. I do not think this is right.

    Qt 5.15.3 and Ubuntu 22.04

    JoeCFDJ 1 Reply Last reply
    0
    • JoeCFDJ JoeCFD

      QPdfView has a nice feature to fit pages to width or height with zoom mode(FitToWidth and FitInView). However, zoom factor is not updated after zoom mode is changed to FitInView and FitToWidth. Then, the old zoom factor is used when zoom mode is switched back to CustomZoom.

      For example, at start-up, set zoom factor to 100% and zoom out to 50%.
      Switch to FitToWidth. Zoom factor is still 50%. Then change zoom mode to CustomZoom and zoom out 50%, zoom factor changes to 0.5 * 0.5 = 0.25. I do not think this is right.

      Qt 5.15.3 and Ubuntu 22.04

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      @JoeCFD Had a look at the source code here:
      https://github.com/qt-labs/qtpdf/blob/dev/src/pdfwidgets/qpdfview.cpp
      m_zoomFactor is not updated in both FitToWidth and FitInView modes.

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by SGaist
        #3

        Hi,

        You might want to check with a more recent version of Qt. 5.15.11 has been released in October if you have. to stay with that series.

        Then you should open an issue about it.

        Since you found the issue, you might want to submit a patch to fix it :-)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        JoeCFDJ 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          You might want to check with a more recent version of Qt. 5.15.11 has been released in October if you have. to stay with that series.

          Then you should open an issue about it.

          Since you found the issue, you might want to submit a patch to fix it :-)

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #4

          @SGaist created a bug report
          https://bugreports.qt.io/browse/QTBUG-119634

          1 Reply Last reply
          1

          • Login

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