<?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[How does the tdesktop render tabs?]]></title><description><![CDATA[<p dir="auto">I'm new to this and trying to figure out how the Telegram team managed to render tabs and chat selection so effectively. Can anyone give me a conceptual overview (perhaps with some key code examples) of how they did it?</p>
<p dir="auto">I tried reading the source code, but it's pretty hard for a beginner to understand—it's written in a very low-level style. By the way, I didn't find a single QTabWidget in it.</p>
<p dir="auto">I'm particularly interested in how they implemented interaction between tabs and the chat,<br />
and how they store both.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/e26ad2d4-2ded-40a7-944b-32bec176a580.png" alt="image-2025-02-08-2036.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I'll try to recreate something similar</p>
]]></description><link>https://forum.qt.io/topic/165019/how-does-the-tdesktop-render-tabs</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Sep 2026 21:50:37 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/165019.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Aug 2026 22:04:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How does the tdesktop render tabs? on Fri, 21 Aug 2026 05:14:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/markoprog">@<bdi>MarkoProg</bdi></a> said in <a href="/post/839803">How does the tdesktop render tabs?</a>:</p>
<blockquote>
<p dir="auto">They don't use QML; they render everything from scratch using QWidgets, and I'm also interested in this approach. How exactly did they achieve this using QWidgets?</p>
</blockquote>
<p dir="auto">The idea the same, regardless of whether you're using Qt Quick or Qt Widgets:</p>
<ul>
<li>A Model stores an overview of the chat data.
<ul>
<li>One row in the Model represents one chat.</li>
<li>A row would contain data like chat title, chat icon, latest timestamp, latest message, delivery status.</li>
</ul>
</li>
<li>A Delegate lays out the GUI components in its rectangle (e.g. icon on the left, timestamp of the top-right).</li>
<li>A ListView (Qt Quick) or QListView/QListWidget (Qt Widgets) is used to display the "tabs".
<ul>
<li>If the <strong>Model</strong> contains N rows (N chats), then the <strong>View</strong> creates N <strong>Delegates</strong>.</li>
<li>The View takes data from each row and gives that data to corresponding Delegate of that row. The Delegate then writes the data into the GUI</li>
</ul>
</li>
</ul>
]]></description><link>https://forum.qt.io/post/839804</link><guid isPermaLink="true">https://forum.qt.io/post/839804</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 21 Aug 2026 05:14:19 GMT</pubDate></item><item><title><![CDATA[Reply to How does the tdesktop render tabs? on Thu, 20 Aug 2026 22:17:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a> They don't use QML; they render everything from scratch using QWidgets, and I'm also interested in this approach. How exactly did they achieve this using QWidgets? It seems to require a deeper understanding of how rendering works in Qt.</p>
]]></description><link>https://forum.qt.io/post/839803</link><guid isPermaLink="true">https://forum.qt.io/post/839803</guid><dc:creator><![CDATA[MarkoProg]]></dc:creator><pubDate>Thu, 20 Aug 2026 22:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to How does the tdesktop render tabs? on Tue, 18 Aug 2026 03:47:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/markoprog">@<bdi>MarkoProg</bdi></a> said in <a href="/post/839764">How does the tdesktop render tabs?</a>:</p>
<blockquote>
<p dir="auto">trying to figure out how the Telegram team managed to render tabs</p>
</blockquote>
<p dir="auto">From your screenshot, that looks like a ListView or similar -- no tabs involved.</p>
<p dir="auto">This tutorial shows a simple version of that: <a href="https://doc.qt.io/qt-6/qtquickcontrols-chattutorial-example.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qtquickcontrols-chattutorial-example.html</a></p>
]]></description><link>https://forum.qt.io/post/839768</link><guid isPermaLink="true">https://forum.qt.io/post/839768</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Tue, 18 Aug 2026 03:47:44 GMT</pubDate></item></channel></rss>