Results 1 to 5 of 5

Thread: Mainicon in osx

  1. #1
    freeskydiver Guest

    Default Mainicon in osx

    Hello,
    how get a icon in my program. The programicon or applicationicon for osx?
    I develop with xcode.
    thanks in advance

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Mainicon in osx

    You mean an icon for your Qt program?
    If so, then do it the usual way, by creating a resource file ( qrc ) and adding the icon there. Make sure you set XCode to compile the qrc.

    If you're not using Qt then you must create a new resource file ( ppob with Constructor or Resorcerer ) and create an icon suite.

  3. #3
    freeskydiver Guest

    Default Re: Mainicon in osx

    Quote Originally Posted by marcel View Post
    You mean an icon for your Qt program?
    If so, then do it the usual way, by creating a resource file ( qrc ) and adding the icon there. Make sure you set XCode to compile the qrc.

    If you're not using Qt then you must create a new resource file ( ppob with Constructor or Resorcerer ) and create an icon suite.
    Yes, I think to the mainicon of my Qtprogram for osx. The qrc I have assigned to code will do compile. How is the name of the icon resource.(MAINICON?)
    Qt Code:
    1. <!DOCTYPE RCC><RCC version="1.0">
    2. <qresource prefix="">
    3. <file alias="MAINICON" >images/icon.ico</file>
    4. </qresource>
    5. </RCC>
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Mainicon in osx

    Quote Originally Posted by freeskydiver View Post
    Hello,
    how get a icon in my program. The programicon or applicationicon for osx?
    I develop with xcode.
    thanks in advance
    Here is my variant...


    Open /Developer Application tool or so Icons manager ...
    save the file default *.icns

    drag your minimum 200x200 png image to all level 20 , 80 , 128 , ....
    and save the file... to root projekt same level as pro file...

    open on your pro file write....

    Qt Code:
    1. macx:RC_FILE = htmlic.icns
    2. win32:RC_FILE = win.rc
    3.  
    4. #### run on unviersal if you build qt -universal
    5. #### macx:QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
    6. #### macx:CONFIG+=x86 ppc
    To copy to clipboard, switch view to plain text mode 


    rewrite xcode file
    qmake -spec macx-xcode *name*.pro

  5. #5
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Mainicon in osx

    the correct path is /Developer/Application/Utilities/icn Composer... part of xcode ... mac

    the default app to make the mac icon format is not ico but .icns

    to each level drag in your image...
    Attached Images Attached Images

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.