Results 1 to 3 of 3

Thread: On item Click in QTreeWidget - to open location of the file in the system in mac

  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default On item Click in QTreeWidget - to open location of the file in the system in mac

    hi

    In treewidget, I am displaying list of all the application files in my system and also there path. On click of item in the QTreeWidget , i want to open the location of that app file in my system with that app file selected on that location.

    For this I used

    Qt Code:
    1. QDesktopServices::openUrl(QUrl("file://"+itemPath));
    To copy to clipboard, switch view to plain text mode 

    by using I will be able to open the location of that selected item from treeWidget in the system, but that item is not selected at that location. Is there any why to open the location with the item selected.
    Always Believe in Urself
    Merry

  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: On item Click in QTreeWidget - to open location of the file in the system in mac

    How do you detect the selected item and how do you get the path so far?

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: On item Click in QTreeWidget - to open location of the file in the system in mac

    How do you detect the selected item and how do you get the path so far?
    The item(name of the Application) that is being clicked in QTreeWidget is the selected item, and in another column i stored path of that item (the path of the Application).
    Last edited by merry; 19th October 2010 at 06:33. Reason: updated contents
    Always Believe in Urself
    Merry

Similar Threads

  1. Log file Location for Windows 7 Application
    By stefanadelbert in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2010, 04:41
  2. popupmenu for QTreeWidget's item when a particular item selected.
    By vinod sharma in forum Best Practices in Qt Programming
    Replies: 1
    Last Post: 22nd January 2010, 10:45
  3. Replies: 1
    Last Post: 20th January 2010, 08:38
  4. How to open any file on button click???
    By r3aktor in forum Newbie
    Replies: 5
    Last Post: 8th July 2009, 08:54
  5. Open pdf file in the standard app system
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 18th February 2008, 15:34

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.