<?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[PyQt5 - How to get title bar height?]]></title><description><![CDATA[<p dir="auto">I'm trying to store the geometry of the window when you close it. But on different operating systems or different settings the title bar height it's different, so it will slowly go down if you close and open the window many times.<br />
So my question is if there is a way to get title bar height?</p>
<p dir="auto">I tried this answer <a href="https://forum.qt.io/topic/99528/window-titlebar-height-example/3">https://forum.qt.io/topic/99528/window-titlebar-height-example/3</a> but it didn't work (on Ubuntu).</p>
]]></description><link>https://forum.qt.io/topic/130515/pyqt5-how-to-get-title-bar-height</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 12:19:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/130515.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Sep 2021 20:10:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PyQt5 - How to get title bar height? on Fri, 24 Sep 2021 20:22:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> When I was writing the example the bug disappeared, so for now it's solved.</p>
]]></description><link>https://forum.qt.io/post/682053</link><guid isPermaLink="true">https://forum.qt.io/post/682053</guid><dc:creator><![CDATA[Patitotective]]></dc:creator><pubDate>Fri, 24 Sep 2021 20:22:03 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt5 - How to get title bar height? on Fri, 24 Sep 2021 05:25:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/patitotective">@<bdi>Patitotective</bdi></a> said in <a href="/post/681885">PyQt5 - How to get title bar height?</a>:</p>
<blockquote>
<p dir="auto">Seems to have the same problem as restoring the window geometry for my own</p>
</blockquote>
<p dir="auto">Not sure what you mean?<br />
Do you mean the approach I posted? If so can you show your code?</p>
]]></description><link>https://forum.qt.io/post/681913</link><guid isPermaLink="true">https://forum.qt.io/post/681913</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 24 Sep 2021 05:25:21 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt5 - How to get title bar height? on Thu, 23 Sep 2021 21:33:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Seems to have the same problem as restoring the window geometry for my own.</p>
]]></description><link>https://forum.qt.io/post/681885</link><guid isPermaLink="true">https://forum.qt.io/post/681885</guid><dc:creator><![CDATA[Patitotective]]></dc:creator><pubDate>Thu, 23 Sep 2021 21:33:00 GMT</pubDate></item><item><title><![CDATA[Reply to PyQt5 - How to get title bar height? on Thu, 23 Sep 2021 06:07:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/patitotective">@<bdi>Patitotective</bdi></a> said in <a href="/post/681726">PyQt5 - How to get title bar height?</a>:</p>
<blockquote>
<p dir="auto">But on different operating systems or different settings the title bar height it's different</p>
</blockquote>
<p dir="auto">But it should be the same on same system?<br />
Also you shouldn't actually care about the title bar. Only store and restore the geometry of the main window like shown here: <a href="https://doc.qt.io/qt-5/restoring-geometry.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/restoring-geometry.html</a></p>
]]></description><link>https://forum.qt.io/post/681739</link><guid isPermaLink="true">https://forum.qt.io/post/681739</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Thu, 23 Sep 2021 06:07:45 GMT</pubDate></item></channel></rss>