Solved Render PDF on QWidget
-
Hi..
There is a way to embed a PDF document into QWidget using QPdfView (third party ?)module, but.. is is possible to render the same using a native Qt way? does QPdfDocument does the job?
Thanks
-
Yes, you can. Find the following example
Examples/Qt-5.15.2/pdf/pdfviewer
and here
https://doc.qt.io/qt-5/qtpdf-pdfviewer-example.html -
Thats good!.. thanks.
-
basically this is what i need:
ui->pdfView->setDocument(m_document);
but still don't get what "pdfView" is.... i see no declaration/definition for it...
greetings..
-
@U7Development said in Render PDF on QWidget:
i see no declaration/definition for it
Check the corresponding ui file in designer or simple hover over ui->pdfView - it should tell you more about it. You can check the generated ui_code. Also you can position cursor there and press F2. There are so many ways...
-
@jsulm i'm manually compiling using text editor with no ui designer tool... but i can switch to designer to see what's inside.. thanks