Results 1 to 2 of 2

Thread: QIcon and System Icons

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Location
    UK
    Posts
    35
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QIcon and System Icons

    Hi,

    I have a QTreeWidget control, displaying various file names that don't exist on the system. Is there any possible way to load the system icon into a QIcon for a specific file type?

    For example, say i have a string in my QTreeWidget "myfile.cpp" can I load the system icon associated with a .cpp file into a QIcon to display in the QTreeWidget?

    Probably a long shot, but i really hope its doable

    Thanks very much,

    Jack

  2. #2
    Join Date
    Dec 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QIcon and System Icons

    On Linux/Unix you could look at XDG desktop specs (for PyQt - pyxdg). On other OS I don't know. You would have to load the icon from the folder where system keeps it's icons by hand (or with the help of MIME detection).

Similar Threads

  1. getting System icons
    By jay in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2008, 10:09

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.