Create App Icon Macos
The application icon, typically displayed in the top-left corner of an application's top-level windows, is set by calling the QWindow::setIcon() method.
In order to change the icon of the executable application file itself, as it is presented on the desktop (that is, prior to application launch), it is necessary to employ another, platform-dependent technique.
Setting the Application Icon on Windows
Macos Big Sur Icons
If you do not use qmake, the necessary steps are: first, create an.rc file and run the rc or windres program on the.rc file, then link your application with the resulting.res file. Setting the Application Icon on macOS. The application icon, typically displayed in the application dock area, is set by calling QWindow::setWindowIcon on a window. Asset Catalog Creator takes any image and creates a full set of icons, splash screens or universal assets for you. Unlike other icon generators, batch resizers or scripts, these are produced in the latest Asset Catalog format, allowing you to drag just a single file into Xcode and have all the correctly sized and named icons identified, in the right place and ready to use.
First, create an ICO format bitmap file that contains the icon image. This can be done using Microsoft Visual Studio: Select File >> New, and choose the Icon File.
Note: You need not load the application into the Visual Studio IDE as you are using the icon editor only.
Alternatively, an .ico
file can be created from a set of images using ImageMagick's convert tool:
Store the ICO file in your application's source code directory, for example, with the name appico.ico
.
MacOS Mojave App Icon. This is a macOS Mojave App Icon Template that through automates the process of rendering all sizes that need to be bundled with macOS Mojave apps. As an extra feature, this template also generates a document icon with your new app icon embedded within. This post is a guide on how to create shortcut icons to the Apple macOS dock for some of Google’s websites such as Gmail, Google Calendar, Google Drive and more. How to create Google Apps icons for your Apple macOS Dock 1. Start the Automator application.
Using CMake
To configure your application's icon, a resource file containing information about the icon is required. A resource file is a text file that contains information about the application resources, such as icons, cursors, fonts, and so on. For more information about resource files and what it can contain, see About Resource Files.
Once you have the .rc
file, add information about the ICO file to it and use it to configure your application icon.
The following snippet example demonstrates how to set up application icon using CMake:
Notice that the set
command, defines the APP_ICON_RESOURCE_WINDOWS
variable, which contains the path of the RC file. This variable is used with the add_executable
command to set the application's icon.
Using qmake
If you are still using qmake to generate your makefiles, you need to add a single line to your .pro
project file:
Finally, regenerate your makefile and your application. The .exe
file will now be represented by your icon in Explorer.
However, if you already have an .rc
file, for example, with the name myapp.rc
, which you want to reuse, the following two steps will be required. First, put a single line of text to the myapp.rc
file:
Then, add this line to your myapp.pro
file:
If you do not use qmake
, the necessary steps are: first, create an .rc
file and run the rc
or windres
program on the .rc
file, then link your application with the resulting .res
file.
Setting the Application Icon on macOS
The application icon, typically displayed in the application dock area, is set by calling QWindow::setWindowIcon() on a window. It is possible that the program could appear in the application dock area before the function call, in which case a default icon will appear during the bouncing animation.
To ensure that the correct icon appears, both when the application is being launched, and in the Finder, it is necessary to employ a platform-dependent technique.
Although many programs can create icon files (.icns
), the recommended approach is to use the iconutil program supplied by Apple. iconutil is a command-line tool that converts iconset folders to deployment-ready, high-resolution icns files. Using this tool also compresses the resulting icns file, so there is no need for you to perform additional compression.
Using CMake
Create App Icon Mac Os 10.10
To configure the application's icon, the Info.plist
file generated by CMake must contain the icon information. This can be achieved by setting the .icns
file name to the MACOSX_BUNDLE_ICON_FILE
variable.
The following snippet demonstrates how to set up the application icon using CMake:

Notice that the first set
command defines the MACOSX_BUNDLE_ICON_FILE
variable, which is required to add the icon file to the Info.plist
file. The second set
command defines the APP_ICON_MACOSX
variable with the absolute path to the icon file. This variable is then used to configure MACOSX_PACKAGE_LOCATION, which defines the icon file's install location. Finally, the add_executable
uses the APP_ICON_MACOSX
variable to set the application's icon.
Using qmake
If you are still using qmake to generate your makefiles, you only need to add a single line to your .pro
project file. For example, if the name of your icon file is myapp.icns
, and your project file is myapp.pro
, add this line to myapp.pro
:
This will ensure that qmake
puts your icons in the proper place and creates an Info.plist
entry for the icon.
If you do not use qmake
, you must do the following manually:
- Create an
Info.plist
file for your application (using thePropertyListEditor
, found inDeveloper/Applications
). - Associate your
.icns
record with theCFBundleIconFile
record in theInfo.plist
file (again, using thePropertyListEditor
). - Copy the
Info.plist
file into your application bundle'sContents
directory. - Copy the
.icns
file into your application bundle'sContents/Resources
directory.
Setting the Application Icon on Common Linux Desktops
In this section we briefly describe the issues involved in providing icons for applications for two common Linux desktop environments: KDE and GNOME. The core technology used to describe application icons is the same for both desktops, and may also apply to others, but there are details which are specific to each. The main source of information on the standards used by these Linux desktops is freedesktop.org. For information on other Linux desktops please refer to the documentation for the desktops you are interested in.
Often, users do not use executable files directly, but instead launch applications by clicking icons on the desktop. These icons are representations of 'desktop entry files' that contain a description of the application that includes information about its icon. Both desktop environments are able to retrieve the information in these files, and they use it to generate shortcuts to applications on the desktop, in the start menu, and on the panel.
More information about desktop entry files can be found in the Desktop Entry Specification.
Although desktop entry files can usefully encapsulate the application's details, we still need to store the icons in the conventional location for each desktop environment. A number of locations for icons are given in the Icon Theme Specification.
Although the path used to locate icons depends on the desktop in use, and on its configuration, the directory structure beneath each of these should follow the same pattern: subdirectories are arranged by theme, icon size, and application type. Generally, application icons are added to the hicolor theme, so a square application icon 32 pixels in size would be stored in the hicolor/32x32/apps
directory beneath the icon path.
K Desktop Environment (KDE)
Application icons can be installed for use by all users, or on a per-user basis. A user currently logged into their KDE 4 desktop can discover these locations by using kde4-config, for example, by typing the following in a terminal window:
Applications using Qt 5 and KDE Frameworks 5 will find their icons in the list returned by this command:
Typically, the list of colon-separated paths printed to stdout includes the user-specific icon path and the system-wide path. Beneath these directories, it should be possible to locate and install icons according to the conventions described in the Icon Theme Specification.
If you are developing exclusively for KDE, you may wish to take advantage of the KDE build system to configure your application. This ensures that your icons are installed in the appropriate locations for KDE.
The KDE developer website is at http://techbase.kde.org/.
GNOME
Application icons are stored within a standard system-wide directory containing architecture-independent files. This location can be determined by using gnome-config
, for example by typing the following in a terminal window:
The path printed on stdout refers to a location that should contain a directory called pixmaps
; the directory structure within the pixmaps
directory is described in the Icon Theme Specification.
If you are developing exclusively for GNOME, you may want to use the standard set of GNU Build Tools. For more information, see the Application launching section. This ensures that your icons are installed in the appropriate locations for GNOME.
The GNOME developer website, http://developer.gnome.org/, provides more insight into developing applications.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.
Take a minute to look at the row of icons at the bottom of your display. That row is the Dock, and those individual pictures are known as icons.
Dock icons are a quick way to bring a hidden window or application to the front so that you can work with it again. Dock icons are odd ducks — they’re activated with a single-click. Most icons are selected (highlighted) when you single click and opened when you double-click. So Dock icons are kind of like links on a Web page — you need only a single click to open them.
You can customize your Dock with favorite applications, a document you update daily, or maybe a folder containing your favorite recipes — use the Dock for anything you need quick access to. Here’s how you can add an icon to the Dock or remove a Dock icon you no longer desire.
Adding an icon to the Dock
Adding an application, file, or folder to the Dock is as easy as 1-2-3. First, open a Finder window that contains an application, file, folder, URL, or disk icon that you use frequently. Then follow these steps to add it to the Dock:
1. Click the item you want to add to the Dock.
2. Drag the icon out of the Finder window and onto the Dock, as shown in Figure 1.
3. An icon for this item now appears on the Dock.
Folder, disk, and URL icons must be on the right of the divider line in the Dock; Application icons must be on the left of it.
Figure 1: Drag an icon onto the Dock to add it.
You can add several items at the same time to the Dock by selecting them all and dragging the group to the Dock. However, you can delete only one icon at a time from the Dock.
Removing an icon from the Dock
To remove an item from the Dock, just drag its icon onto the Desktop. It disappears with a cool poof animation, as shown in Figure 2.
Figure 2: To remove an icon, drag it off the Dock and POOF — it’s gone.
By moving an icon out of the Dock, you aren’t moving, deleting, or copying the item itself — you’re just removing its icon from the Dock. The item is unchanged. Think of it like a library catalog card: Just because you remove the card from the card catalog doesn’t mean that the book is gone from the library.
After you figure out which programs you use and don’t use, it’s a good idea to relieve overcrowding by removing the ones you never (or rarely) use.
Knowing what to put in your Dock
Put things on the Dock that you need quick access to and that you use often, or add items that aren’t quickly available from menus or the sidebar. If you like using the Dock better than the Finder window sidebar, for example, add your Documents, Movies, Pictures, Music, or even your hard disk to the Dock.
Consider adding these items to your Dock:
- A word-processing application: Most people use word-processing software more than any other application.
- A project folder: You know, the folder that contains all the documents for your thesis, or the biggest project you have at work, or your massive recipe collection . . . whatever. Add that folder to the Dock, and then you can access it much quicker than if you have to open several folders to find it.
- Don’t forget — if you
press
- (click but don’t let go) on a folder icon, a handy hierarchical menu of its contents appears.
- A special utility or application: You may want to add your favorite graphics application such as Photoshop, or the game you play every afternoon when you think the boss isn’t watching.
- Your favorite URLs: Save links to sites that you visit every day — ones that you use in your job, your favorite Mac news sites, or your personalized page from an Internet service provider (ISP). Sure, you can make one of these pages your browser’s start page or bookmark it, but the Dock lets you add one or more additional URLs.
- Here’s how to quickly add a URL to the Dock. Open Safari and go to the page with a URL that you want to save on the Dock. Click and drag the small icon that you find at the left of the URL in the Address bar to the right side of the dividing line in the Dock (at the arrow’s head in Figure 3) and then release the mouse button. The icons in the Dock will slide over and make room for your URL. From now on, when you click the URL icon that you moved to your Dock, Safari opens to that page.
Figure 3: To save a URL to your Dock, drag its little icon from the Address bar to the right side of the Dock.
- You can add several URL icons to the Dock, but bear in mind that the Dock and its icons shrink to accommodate added icons, thus making them harder to see. Perhaps the best idea — if you want easy access to several URLs — is to create a folder full of URLs and put that folder on the Dock. Then you can just press and hold your mouse pointer on the folder (or Control-click the folder) to pop up a menu with all your URLs.
Even though you can make the Dock smaller, you’re still limited to one row of icons. The smaller you make the Dock, the larger the crowd of icons you can amass. You have to determine for yourself what’s best for you: having lots of icons available on the Dock (even though they may be difficult to see because they’re so tiny) or having less clutter but fewer icons on your Dock.