Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How to detect if PDF reader is installed

    General and Desktop
    2
    5
    974
    Loading More Posts
    • 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.
    • L
      ljc123456gogo last edited by ljc123456gogo

      From my application, it can auto-open a PDF file. This is works fine as long as the user has a PDF reader installed on his PC. I'd like to detect if this is the case so I can show a warning message if it's not ("Please install PDF reader in order to read PDF files...). Does Qt provide a means to detect this?
      Thanks inadvance.

      Keep Hungery, Keep Foolish!

      1 Reply Last reply Reply Quote 0
      • L
        ljc123456gogo last edited by ljc123456gogo

        I have an idea which is dectect the installed software in the computer first, then search the pdf reader name.
        But I don't know whether Qt have the funtion to dectect the installed software.

        Keep Hungery, Keep Foolish!

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          No it doesn't but AFAIK, most OSes shows this kind of dialog when trying to open a file of unsupported format.

          How are you opening your PDF ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply Reply Quote 0
          • L
            ljc123456gogo @SGaist last edited by

            @SGaist
            I use the QWebview to load the path of a PDF file, beacuse Adobe Reader could open PDF in browser.

            Keep Hungery, Keep Foolish!

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Then provide it with a PDF plugin like described here

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • First post
                Last post