Results 1 to 2 of 2

Thread: Qt5 on Linux - Getting correct icon based on a file / mimetype from system icon theme

  1. #1
    Join Date
    Apr 2015
    Posts
    20
    Thanks
    7
    Qt products
    Platforms
    Unix/X11

    Question Qt5 on Linux - Getting correct icon based on a file / mimetype from system icon theme

    If I have a path to a file.
    Can Qt help somehow in getting the correct icon for that file type?

    Example:
    if I got ~/pictures/qt_logo.png with mimetype image/png
    Could Qt figure out that set theme is Menda-Circle and path to corresponding icon would be /usr/share/icons/Menda-Circle/mimetypes/24x24/application-image-png.svg

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt5 on Linux - Getting correct icon based on a file / mimetype from system icon t


Similar Threads

  1. How to display icon from theme in QLabel?
    By Infinity in forum Qt Programming
    Replies: 2
    Last Post: 24th July 2013, 18:40
  2. Linux - Support system's theme change
    By agarny in forum Qt Programming
    Replies: 2
    Last Post: 10th July 2011, 17:12
  3. Replies: 0
    Last Post: 17th March 2010, 14:25
  4. Icon from theme
    By wirasto in forum Qt Programming
    Replies: 1
    Last Post: 22nd December 2009, 13:42
  5. How to get system associated icon for any file
    By rittchat in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2009, 05:16

Tags for this Thread

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.