<?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[Changing QTabBar::tab border color breaks the width &amp; padding?]]></title><description><![CDATA[<p dir="auto">I was styling my app and ran into some weird behavior when trying to override border colors, and was able to narrow it down to this minimal example...</p>
<p dir="auto">With no styling my tabs look like this:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/906ab53f-bb57-4230-ba64-d4896d722a0c.png" alt="1923412d-dbf4-4409-b476-c9904668be6b-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">But when I apply any border related styling like the snippet below, it changes to this:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/7679e160-3836-479b-bc96-cb6174fe3e81.png" alt="bca2fa31-5ec6-44ec-b700-9cd251be9c62-image.png" class=" img-fluid img-markdown" /></p>
<pre><code>QTabBar::tab {
    border-color: black;
}
</code></pre>
<p dir="auto">Can anyone please help me understand why this is happening? I'd like to change colors without side-effects like this</p>
]]></description><link>https://forum.qt.io/topic/120486/changing-qtabbar-tab-border-color-breaks-the-width-padding</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Mar 2026 10:27:26 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/120486.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Nov 2020 07:57:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Changing QTabBar::tab border color breaks the width &amp; padding? on Mon, 02 Nov 2020 08:30:17 GMT]]></title><description><![CDATA[<p dir="auto">Without stylesheet a platform plugin is used to draw controls. When you set a border with qss the style for the control is changed to use the qss style with everything you didn't set left at defaults (no border, transparent background, no padding etc.).<br />
Text color is sort of an exception, because it only overrides the palette, but for the most part when you use stylesheets it's all or nothing. If you want a custom qss border you need to recreate the rest of the native look i.e. set border (not just color), background and padding.</p>
]]></description><link>https://forum.qt.io/post/625291</link><guid isPermaLink="true">https://forum.qt.io/post/625291</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Mon, 02 Nov 2020 08:30:17 GMT</pubDate></item><item><title><![CDATA[Reply to Changing QTabBar::tab border color breaks the width &amp; padding? on Mon, 02 Nov 2020 08:44:52 GMT]]></title><description><![CDATA[<p dir="auto">Ok thanks for the replies, I will try to recreate the Fusion style with my own QSS and colors</p>
]]></description><link>https://forum.qt.io/post/625298</link><guid isPermaLink="true">https://forum.qt.io/post/625298</guid><dc:creator><![CDATA[Esor]]></dc:creator><pubDate>Mon, 02 Nov 2020 08:44:52 GMT</pubDate></item><item><title><![CDATA[Reply to Changing QTabBar::tab border color breaks the width &amp; padding? on Mon, 02 Nov 2020 08:30:17 GMT]]></title><description><![CDATA[<p dir="auto">Without stylesheet a platform plugin is used to draw controls. When you set a border with qss the style for the control is changed to use the qss style with everything you didn't set left at defaults (no border, transparent background, no padding etc.).<br />
Text color is sort of an exception, because it only overrides the palette, but for the most part when you use stylesheets it's all or nothing. If you want a custom qss border you need to recreate the rest of the native look i.e. set border (not just color), background and padding.</p>
]]></description><link>https://forum.qt.io/post/625291</link><guid isPermaLink="true">https://forum.qt.io/post/625291</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Mon, 02 Nov 2020 08:30:17 GMT</pubDate></item><item><title><![CDATA[Reply to Changing QTabBar::tab border color breaks the width &amp; padding? on Mon, 02 Nov 2020 08:01:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/esor">@<bdi>Esor</bdi></a> I guess you're overwriting the default style sheet with your own which only defines the border color, everything else is lost then. Check the default style-sheet.</p>
]]></description><link>https://forum.qt.io/post/625285</link><guid isPermaLink="true">https://forum.qt.io/post/625285</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 02 Nov 2020 08:01:35 GMT</pubDate></item></channel></rss>