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 display PDF file in qml
Forum Updated to NodeBB v4.3 + New Features

How to display PDF file in qml

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 778 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Shubham Gupta
    wrote on last edited by Shubham Gupta
    #1

    @dheerendra
    I want to open a pdf file when i press my mouse click.
    Please suggest?

    Shubham Gupta

    raven-worxR 1 Reply Last reply
    0
    • S Shubham Gupta

      @dheerendra
      I want to open a pdf file when i press my mouse click.
      Please suggest?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Shubham-Gupta
      you want to open (with the system's default application) or you want to display it inside an QML application?!

      To open it with the OS' default application use:

      QDesktopServices::openUrl( QUrl::fromLocalFile("/path/to/file.pdf") );
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      S 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @Shubham-Gupta
        you want to open (with the system's default application) or you want to display it inside an QML application?!

        To open it with the OS' default application use:

        QDesktopServices::openUrl( QUrl::fromLocalFile("/path/to/file.pdf") );
        
        S Offline
        S Offline
        Shubham Gupta
        wrote on last edited by
        #3

        @raven-worx
        I am not using c++ in my code.
        only qml is there.

        Shubham Gupta

        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