<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Label in Mac dock icon [Solved]]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I'm not sure whether my previous research on this was for Java Swing or Qt, but I haven't been able to find any usable results right now:</p>
<p dir="auto">Is it possible to add a (1-2 digit) label to a dock icon on Mac OS with Qt? I know it's possible using pure Obj. C, but is there a specific interface in Qt that does just that?</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.qt.io/topic/33233/label-in-mac-dock-icon-solved</link><generator>RSS for Node</generator><lastBuildDate>Wed, 06 May 2026 06:48:25 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/33233.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Oct 2013 11:44:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Label in Mac dock icon [Solved] on Sat, 02 Nov 2013 03:23:40 GMT]]></title><description><![CDATA[<p dir="auto">Sounds good, thanks for info!</p>
]]></description><link>https://forum.qt.io/post/200536</link><guid isPermaLink="true">https://forum.qt.io/post/200536</guid><dc:creator><![CDATA[janfaroe]]></dc:creator><pubDate>Sat, 02 Nov 2013 03:23:40 GMT</pubDate></item><item><title><![CDATA[Reply to Label in Mac dock icon [Solved] on Fri, 01 Nov 2013 22:39:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi again,</p>
<p dir="auto">There are now helper functions in qtmacextras to do that</p>
]]></description><link>https://forum.qt.io/post/200535</link><guid isPermaLink="true">https://forum.qt.io/post/200535</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 01 Nov 2013 22:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to Label in Mac dock icon [Solved] on Sat, 19 Oct 2013 22:19:29 GMT]]></title><description><![CDATA[<p dir="auto">Na, you were just quicker to find the solution :)</p>
<p dir="auto">Thanks for sharing !</p>
]]></description><link>https://forum.qt.io/post/199732</link><guid isPermaLink="true">https://forum.qt.io/post/199732</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 19 Oct 2013 22:19:29 GMT</pubDate></item><item><title><![CDATA[Reply to Label in Mac dock icon [Solved] on Sat, 19 Oct 2013 18:22:46 GMT]]></title><description><![CDATA[<p dir="auto">The silence tells everything I guess. Oh well. Even though my objective C skills are below zero, I managed to put together a simple wrapper class after a bit of googling and experimentation:</p>
<p dir="auto">DockIconLabel.h:</p>
<p dir="auto">@#ifndef DOCKICONLABEL_H<br />
#define DOCKICONLABEL_H</p>
<p dir="auto">#include &lt;QString&gt;</p>
<p dir="auto">class DockIconLabel<br />
{<br />
public:<br />
static void setValue(const QString &amp;val);<br />
};</p>
<p dir="auto">#endif // DOCKICONLABEL_H@</p>
<p dir="auto"><a href="http://DockIconLabel.mm" target="_blank" rel="noopener noreferrer nofollow ugc">DockIconLabel.mm</a>:</p>
<p dir="auto">@#include "DockIconLabel.h"<br />
#import "Foundation/NSAutoreleasePool.h"<br />
#import "AppKit/NSApplication.h"</p>
<p dir="auto">void DockIconLabel::setValue(const QString &amp;val)<br />
{<br />
const QByteArray utf8 = val.toUtf8();<br />
const char* cString = utf8.constData();<br />
&lsqb;&lsqb;[NSApplication sharedApplication] dockTile] setBadgeLabel:&lsqb;&lsqb;NSString alloc] initWithUTF8String:cString&rsqb;&rsqb;;<br />
}</p>
<p dir="auto">@</p>
]]></description><link>https://forum.qt.io/post/199715</link><guid isPermaLink="true">https://forum.qt.io/post/199715</guid><dc:creator><![CDATA[janfaroe]]></dc:creator><pubDate>Sat, 19 Oct 2013 18:22:46 GMT</pubDate></item></channel></rss>