How to enable QtQuick.Pdf in PySide6
-
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 documentationimport 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: