Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131841

PdfScrollablePageView does not work in the app

    XMLWordPrintable

Details

    • Linux/X11
    • 8c07478a3 (dev), f26d74681 (6.9), 26533ea5b (6.8)

    Description

      Qt forum post

      PdfScrollablePageView does not work in the app but only when I launch the single file.

       

      This is the single file:
      ```
      import QtQuick
      import QtQuick.Pdf

      PdfScrollablePageView {
          id: pdfPage
          document: PdfDocument {
              id: doc
              source: "/home/user/.local/share/org/app/data/Model1/file.pdf"
              onSourceChanged:

      {             console.log('DOC.SOURCE CHANGED' + doc.source)         }

          }

          onStatusChanged:

      {         console.log('Status changed ' + status)     }

          Component.onCompleted:

      {         console.log('OnCompleted status ' + status)         console.log('OnCompleted DOC.SOURCE ' + doc.source)     }

      }
      ```
      This the log when I run the app:
      ```
      qml: OnCompleted status 0
      qml: OnCompleted DOC.SOURCE /home/user/.local/share/org/app/data/Model1/file.pdf
      ```

      This when I run only that file with `qml6 file.qml`:
      ```
      qml: Status changed 2
      qml: OnCompleted status 2
      qml: OnCompleted DOC.SOURCE /home/user/.local/share/org/app/data/Model1/file.pdf
      qml: Status changed 1
      ```

      I think that status 0 is the first of https://doc.qt.io/qt-6/qml-qtquick-image.html#status-prop so `No image has been set`.
      I tried to set it after in `Component.onCompleted` and some things but when I run the app status is 0 and does not change.

      Attachments

        1. image-2025-02-10-19-11-10-036.png
          84 kB
          Shawn Rutledge
        2. app.tar
          191 kB
          Real Root
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            realroot Real Root
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes