Results 1 to 2 of 2

Thread: local html file and QDesktopServices::openUrl

  1. #1
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question local html file and QDesktopServices::openUrl

    I have a local html file that I want to open in a browser. Because it has file:// at the beginning of the url, it will not open it in a browser but instead opens it in a filesystem window (i.e. explorer).

    Is there any way to get this local html file to open in a browser?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: local html file and QDesktopServices::openUrl

    It should work if you remove "file://" from the path and it starts with e.g. "c:\".

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::openUrl() slow
    By rbp in forum Qt Programming
    Replies: 10
    Last Post: 23rd January 2011, 16:30
  3. Replies: 0
    Last Post: 16th April 2010, 11:16
  4. Replies: 4
    Last Post: 3rd August 2009, 20:25
  5. QDesktopServices::openUrl and HTML fragments
    By roro in forum Qt Programming
    Replies: 2
    Last Post: 18th June 2007, 17:31

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.