Results 1 to 2 of 2

Thread: QDesktopServices , open a file in finder with selection

  1. #1
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QDesktopServices , open a file in finder with selection

    Hi all,


    i m using QDesktopServices::openUrl(QUrl("file://"+filePath)) to open a file in finder. by this file is open in the finder but selection is not appear on the file so what can i do for the file selection in finder.

    please help.

    Thanks
    Last edited by wysota; 27th June 2011 at 08:21.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QDesktopServices , open a file in finder with selection

    I assume you are doing this on MacOS, I am not much aware of MacOS, but what I can tell is you are trying to open a file / directory, with system application, which needs some start up arguments to select the file, all you can set using openUrl is path, even if you specify the arguments, they will be considered as part of file name. So I think it may not be possible

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. Open file/folder in finder with selection
    By anjul.chauhan in forum Qt Programming
    Replies: 0
    Last Post: 20th June 2011, 07:10
  3. Replies: 3
    Last Post: 25th August 2010, 12:39
  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.