This file is indexed.

/usr/share/qt5/doc/qtdoc/appicon.html is in qt5-doc-html 5.2.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- appicon.qdoc -->
  <title>Setting the Application Icon | QtDoc 5.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">Qt 5.2</a></li>
<li>Setting the Application Icon</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#setting-the-application-icon-on-windows">Setting the Application Icon on Windows</a></li>
<li class="level1"><a href="#setting-the-application-icon-on-mac-os-x">Setting the Application Icon on Mac OS X</a></li>
<li class="level1"><a href="#setting-the-application-icon-on-common-linux-desktops">Setting the Application Icon on Common Linux Desktops</a></li>
<li class="level2"><a href="#k-desktop-environment-kde">K Desktop Environment (KDE)</a></li>
<li class="level2"><a href="#gnome">GNOME</a></li>
</ul>
</div>
<h1 class="title">Setting the Application Icon</h1>
<span class="subtitle"></span>
<!-- $$$appicon.html-description -->
<div class="descr"> <a name="details"></a>
<p>The application icon, typically displayed in the top-left corner of an application's top-level windows, is set by calling the QWindow::setWindowIcon() method.</p>
<p>In order to change the icon of the executable application file itself, as it is presented on the desktop (i.e&#x2e;, prior to application execution), it is necessary to employ another, platform-dependent technique.</p>
<a name="setting-the-application-icon-on-windows"></a>
<h2>Setting the Application Icon on Windows</h2>
<p>First, create an ICO format bitmap file that contains the icon image. This can be done with e.g&#x2e; Microsoft Visual C++: Select <b>File|New</b>, then select the <b>File</b> tab in the dialog that appears, and choose <b>Icon</b>. (Note that you do not need to load your application into Visual C++; here we are only using the icon editor.)</p>
<p>Store the ICO file in your application's source code directory, for example, with the name <tt>myappico.ico</tt>.</p>
<p>Then, assuming you are using qmake to generate your makefiles, you only need to add a single line to your <tt>.pro</tt> project file:</p>
<pre class="cpp">RC_ICONS = myappico.ico</pre>
<p>Finally, regenerate your makefile and your application. The <tt>.exe</tt> file will now be represented by your icon in Explorer.</p>
<p>However, if you already have an <tt>.rc</tt> file, for example, with the name <tt>myapp.rc</tt>, which you want to reuse, the following two steps will be required. First, put a single line of text to the <tt>myapp.rc</tt> file:</p>
<pre class="cpp">IDI_ICON1               ICON    DISCARDABLE     <span class="string">&quot;myappico.ico&quot;</span></pre>
<p>Then, add this line to your <tt>myapp.pro</tt> file:</p>
<pre class="cpp">RC_FILE = myapp.rc</pre>
<p>If you do not use <tt>qmake</tt>, the necessary steps are: first, create an <tt>.rc</tt> file and run the <tt>rc</tt> or <tt>windres</tt> program on the <tt>.rc</tt> file, then link your application with the resulting <tt>.res</tt> file.</p>
<a name="setting-the-application-icon-on-mac-os-x"></a>
<h2>Setting the Application Icon on Mac OS X</h2>
<p>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.</p>
<p>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.</p>
<p>Although many programs can create icon files (<tt>.icns</tt>), the recommended approach is to use the <i>Icon Composer</i> program supplied by Apple (in the <tt>Developer/Application</tt> folder). <i>Icon Composer</i> allows you to import several different sized icons (for use in different contexts) as well as the masks that go with them. Save the set of icons to a file in your project directory.</p>
<p>If you are using qmake to generate your makefiles, you only need to add a single line to your <tt>.pro</tt> project file. For example, if the name of your icon file is <tt>myapp.icns</tt>, and your project file is <tt>myapp.pro</tt>, add this line to <tt>myapp.pro</tt>:</p>
<pre class="cpp">ICON = myapp.icns</pre>
<p>This will ensure that <tt>qmake</tt> puts your icons in the proper place and creates an <tt>Info.plist</tt> entry for the icon.</p>
<p>If you do not use <tt>qmake</tt>, you must do the following manually:</p>
<ol class="1">
<li>Create an <tt>Info.plist</tt> file for your application (using the <tt>PropertyListEditor</tt>, found in <tt>Developer/Applications</tt>).</li>
<li>Associate your <tt>.icns</tt> record with the <tt>CFBundleIconFile</tt> record in the <tt>Info.plist</tt> file (again, using the <tt>PropertyListEditor</tt>).</li>
<li>Copy the <tt>Info.plist</tt> file into your application bundle's <tt>Contents</tt> directory.</li>
<li>Copy the <tt>.icns</tt> file into your application bundle's <tt>Contents/Resources</tt> directory.</li>
</ol>
<a name="setting-the-application-icon-on-common-linux-desktops"></a>
<h2>Setting the Application Icon on Common Linux Desktops</h2>
<p>In this section we briefly describe the issues involved in providing icons for applications for two common Linux desktop environments: <a href="http://www.kde.org/">KDE</a> and <a href="http://www.gnome.org/">GNOME</a>. 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 <a href="http://www.freedesktop.org/">freedesktop.org</a>. For information on other Linux desktops please refer to the documentation for the desktops you are interested in.</p>
<p>Often, users do not use executable files directly, but instead launch applications by clicking icons on the desktop. These icons are representations of &quot;desktop entry files&quot; 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.</p>
<p>More information about desktop entry files can be found in the <a href="http://www.freedesktop.org/Standards/desktop-entry-spec">Desktop Entry Specification</a>.</p>
<p>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 <a href="http://www.freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</a>.</p>
<p>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 <tt>hicolor/32x32/apps</tt> directory beneath the icon path.</p>
<a name="k-desktop-environment-kde"></a>
<h3>K Desktop Environment (KDE)</h3>
<p>Application icons can be installed for use by all users, or on a per-user basis. A user currently logged into their KDE desktop can discover these locations by using <a href="http://developer.kde.org/documentation/other/kde-config.html">kde-config</a>, for example, by typing the following in a terminal window:</p>
<pre class="cpp">kde<span class="operator">-</span>config <span class="operator">-</span><span class="operator">-</span>path icon</pre>
<p>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 <a href="http://www.freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</a>.</p>
<p>If you are developing exclusively for KDE, you may wish to take advantage of the <a href="http://developer.kde.org/documentation/other/makefile_am_howto.html">KDE build system</a> to configure your application. This ensures that your icons are installed in the appropriate locations for KDE.</p>
<p>The KDE developer website is at <a href="http://developer.kde.org/">http://developer.kde.org/</a>.</p>
<a name="gnome"></a>
<h3>GNOME</h3>
<p>Application icons are stored within a standard system-wide directory containing architecture-independent files. This location can be determined by using <tt>gnome-config</tt>, for example by typing the following in a terminal window:</p>
<pre class="cpp">gnome<span class="operator">-</span>config <span class="operator">-</span><span class="operator">-</span>datadir</pre>
<p>The path printed on stdout refers to a location that should contain a directory called <tt>pixmaps</tt>; the directory structure within the <tt>pixmaps</tt> directory is described in the <a href="http://www.freedesktop.org/Standards/icon-theme-spec">Icon Theme Specification</a>.</p>
<p>If you are developing exclusively for GNOME, you may wish to use the standard set of <a href="http://developer.gnome.org/tools/build.html">GNU Build Tools</a>, also described in the relevant section of the <a href="http://developer.gnome.org/doc/GGAD/ggad.html">GTK+/Gnome Application Development book</a>. This ensures that your icons are installed in the appropriate locations for GNOME.</p>
<p>The GNOME developer website is at <a href="http://developer.gnome.org/">http://developer.gnome.org/</a>.</p>
</div>
<!-- @@@appicon.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
   subsidiaries. Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>