Results 1 to 6 of 6

Thread: about setting executable file icon

  1. #1
    Join Date
    May 2010
    Posts
    42

    Question about setting executable file icon

    hi guys!
    I would like to know how to add an Icon to an executable QT file in linux. Should I modify the .pro file?
    Is there any method that could change it?

    Thanks!

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default

    What did you try till now ?
    You can set the icon with QApplication::setWindowIcon and embedd the icon as a resource in qrc.
    Last edited by wysota; 15th June 2010 at 00:35.

  3. #3
    Join Date
    May 2010
    Posts
    42

    Question Re: about setting executable file icon

    Quote Originally Posted by aamer4yu View Post
    What did you try till now ?
    You can set the icon with QApplication::setWindowIcon and embedd the icon as a resource in qrc.
    this method i have tried.but the executable file's icon didn't change.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: about setting executable file icon

    You need to create a .desktop file for your application and deploy it in the system.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2010
    Posts
    42

    Default Re: about setting executable file icon

    Quote Originally Posted by wysota View Post
    You need to create a .desktop file for your application and deploy it in the system.

    If you can tell me the method in detail?thanks!

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: about setting executable file icon

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 5
    Last Post: 30th August 2011, 23:21
  2. Replies: 5
    Last Post: 15th June 2010, 07:42
  3. Replies: 0
    Last Post: 17th March 2010, 13:25
  4. Icon for executable
    By schan117 in forum Qt Programming
    Replies: 1
    Last Post: 22nd September 2009, 16:58
  5. Setting OS Specified Icon on the File?
    By vishal.chauhan in forum Qt Programming
    Replies: 4
    Last Post: 31st May 2008, 12:37

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.