Results 1 to 3 of 3

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

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

    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
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    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
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    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, 00:01
  2. Replies: 10
    Last Post: 1st July 2010, 10:59
  3. running external console program by gui program
    By alireza.mixedreality in forum Qt Programming
    Replies: 4
    Last Post: 24th April 2010, 18:05
  4. Opening a program instead of a file
    By jaybstory in forum Newbie
    Replies: 4
    Last Post: 14th January 2010, 04:33
  5. Opening swf file in the default browser
    By munna in forum Qt Programming
    Replies: 16
    Last Post: 5th May 2006, 09: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.