<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11075">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Actually, I do not know, whether there is an API that allows to force Mac OS to create such list in the Dock menu, but if an app implements "Window" menu (systemMenu="window" in the menu xib file), then this list is generated automatically.</p></blockquote>

<p>It's been too long since I did native Mac GUI app development from scratch, so I'll take your word for this =)</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Do you happen to know whether it would be possible to do from Qt?</p></blockquote>

<p>Qt4 apps used to create a temporary NIB file in $TMPDIR and load that. I cannot recall having seen something similar in Qt5 and cannot find any evidence of it in the code. But just as with Info.plists there might be a way to create the information normally read from a nib/xib file purely in memory.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">Shall I consider this as a feature request? I personally do not use it.</pre></div></blockquote>

<p>This is not something that should be implemented in individual applications. I was planning to ask on the Qt ML about implementing such a feature. If Qt doesn't have anything suitable for tracking window creation a logical place would be KWindowSystem (which already has some code for tracking window creation), and maybe the management of the Windows menu could be implemented in a platform integration plugin.</p>

<p>I do see there's a Qt systemMenu() equivalent for QMdiSubWindows.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">They are sorted for Cocoa apps.</pre></div></blockquote>

<p>Interesting. I'm pretty certain that entries in the Windows menu are ordered chronologically, at least in those applications where they get a shortcut. (I've never checked if that's always the case.).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11075">https://phabricator.kde.org/D11075</a></div></div><br /><div><strong>To: </strong>sbragin, rjvbb<br /><strong>Cc: </strong>rjvbb, Okular, michaelweghorn, ngraham, aacid<br /></div>