Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to enable QtQuick.Pdf in PySide6
Forum Updated to NodeBB v4.3 + New Features

How to enable QtQuick.Pdf in PySide6

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 481 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.
  • A Offline
    A Offline
    allenZ
    wrote on last edited by allenZ
    #1

    My env: PySide 6.3.2 python 3.10.6 windows 10
    im tring to show a pdf file in qml with the qt quick pdf module as the documentation

    import QtQuick
    import QtQuick.Pdf
    
    PdfMultiPageView {
        document: PdfDocument { source: "my.pdf" }
    }
    

    when i run qml .\qml\custom\PdfViewer.qml
    got this error:
    file:///F:/projects/SVTHistChemistry-develop/qml/custom/PdfViewer.qml:2:1: module "QtQuick.Pdf" is not installed qml: Did not load any objects, exiting.
    some solution said should add QT += pdf to .pro file, that's for cpp program right?
    how to enable the QtQuick.Pdf in PySide6, is there a similiar setting like that, or need to rebuild PySide by myself
    the pdf module is under QtQuick dir:
    b91c822f-53a0-4597-bef5-cc522d02643b-image.png

    1 Reply Last reply
    0
    • A Offline
      A Offline
      allenZ
      wrote on last edited by
      #2

      does anyone can offer some help, thanks in advance

      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