Results 1 to 3 of 3

Thread: Running external file using its default program for opening.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Posts
    68
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8

    Default Running external file using its default program for opening.

    Hello.

    Is it possible to run for example .mp3 or .rar file in default program used for opening such files? I'm asking about Windows. For example, I'd like to run an .avi file and it should open in AllPlayer because it's the default program for opening files with such extension on my OS. I have taken a look on QProcess but it doesn't seem to be suitable solution here.

    Thanks in advance.

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

    Default Re: Running external file using its default program for opening.

    Have a look at QDesktopServices::openUrl().

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

    kremuwa (5th August 2010)

  4. #3
    Join Date
    Feb 2010
    Posts
    68
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8

    Default Re: Running external file using its default program for opening.

    I have seen it since I'm using this function in my app, but I've completely forgotten that the url don't have to be Internet URL . Thanks a lot!

Similar Threads

  1. Replies: 9
    Last Post: 23rd August 2012, 01:01
  2. Replies: 10
    Last Post: 1st July 2010, 11:59
  3. running external console program by gui program
    By alireza.mixedreality in forum Qt Programming
    Replies: 4
    Last Post: 24th April 2010, 19:05
  4. Opening a program instead of a file
    By jaybstory in forum Newbie
    Replies: 4
    Last Post: 14th January 2010, 05:33
  5. Opening swf file in the default browser
    By munna in forum Qt Programming
    Replies: 16
    Last Post: 5th May 2006, 10:33

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
  •  
Qt is a trademark of The Qt Company.