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. Render PDF on QWidget
Forum Updated to NodeBB v4.3 + New Features

Render PDF on QWidget

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 592 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.
  • U Offline
    U Offline
    U7Development
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      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

      1 Reply Last reply
      1
      • U Offline
        U Offline
        U7Development
        wrote on last edited by
        #3

        Thats good!.. thanks.

        1 Reply Last reply
        0
        • U Offline
          U Offline
          U7Development
          wrote on last edited by
          #4

          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..

          jsulmJ 1 Reply Last reply
          0
          • U U7Development

            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..

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @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...

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            U 1 Reply Last reply
            3
            • jsulmJ jsulm

              @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...

              U Offline
              U Offline
              U7Development
              wrote on last edited by
              #6

              @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

              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