Results 1 to 2 of 2

Thread: how to open a pdf file using QDesktopServices

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Smile how to open a pdf file using QDesktopServices

    Is this correct.


    Source code
    1
    QDesktopServices:penUrl(QUrl("file://C:\\Users\\DasmahapatraS\\Projects\\Bikraam_Databa se\\STUREC\\resumePDF.pdf",QUrl::TolerantMode

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to open a pdf file using QDesktopServices

    Did it work when you tried it?

    You should look at QUrl.isValid() and QUrl::fromLocalFile() and read my signature.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  3. The following user says thank you to ChrisW67 for this useful post:

    sedi (9th March 2013)

Similar Threads

  1. QDesktopServices open url & local file & pdf or doc
    By patrik08 in forum Qt Programming
    Replies: 9
    Last Post: 14th April 2012, 04:42
  2. QDesktopServices , open a file in finder with selection
    By anjul.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 27th June 2011, 09:25
  3. local html file and QDesktopServices::openUrl
    By ntp in forum Qt Programming
    Replies: 1
    Last Post: 19th August 2010, 08:05
  4. QDesktopServices to open resource file?
    By wconstan in forum Newbie
    Replies: 1
    Last Post: 8th January 2010, 12:16
  5. Replies: 4
    Last Post: 3rd August 2009, 20:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.