<?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[Stylesheets: Different background colors inside QTabBar]]></title><description><![CDATA[<p dir="auto">Hello everyone,</p>
<p dir="auto">I have a QTabBar and I want to know if the following is possible:<br />
I rounded the corners of the tabs, using:</p>
<p dir="auto">border-top-left-radius: 10px;<br />
border-top-right-radius: 10px;</p>
<p dir="auto">Now that the corners are round, behind them appears the background color of the QTabWidget. I would however prefer to see the background color of the parent element. Is that possible?</p>
<p dir="auto">Cheers<br />
Alex</p>
]]></description><link>https://forum.qt.io/topic/73956/stylesheets-different-background-colors-inside-qtabbar</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 21:33:46 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/73956.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Dec 2016 14:28:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stylesheets: Different background colors inside QTabBar on Fri, 02 Dec 2016 16:29:04 GMT]]></title><description><![CDATA[<p dir="auto">Oh, I get it now! I should've put the "QTabBar { background: transparent; }" into the QTabWidget's stylesheet. Thanks!</p>
]]></description><link>https://forum.qt.io/post/362748</link><guid isPermaLink="true">https://forum.qt.io/post/362748</guid><dc:creator><![CDATA[__Alex__]]></dc:creator><pubDate>Fri, 02 Dec 2016 16:29:04 GMT</pubDate></item><item><title><![CDATA[Reply to Stylesheets: Different background colors inside QTabBar on Fri, 02 Dec 2016 15:50:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/__alex__">@<bdi>__Alex__</bdi></a> said in <a href="/post/362731">Stylesheets: Different background colors inside QTabBar</a>:</p>
<blockquote>
<p dir="auto">QTabBar::tab {<br />
background: rgb(200,210,235);<br />
border: 2px solid rgb(160, 170, 220);<br />
min-width: 64px;<br />
padding: 4px;<br />
border-top-left-radius: 10px;<br />
border-top-right-radius: 10px;</p>
<p dir="auto">}</p>
<p dir="auto">QTabBar { background: transparent; }</p>
</blockquote>
<p dir="auto">These 2 definitions do what you intend to do. That's also what the <a href="http://doc.qt.io/qt-4.8/stylesheet-reference.html#border-image-prop" target="_blank" rel="noopener noreferrer nofollow ugc">docs</a> say.<br />
I tried it with Qt 4.8 on Windows.</p>
]]></description><link>https://forum.qt.io/post/362733</link><guid isPermaLink="true">https://forum.qt.io/post/362733</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Fri, 02 Dec 2016 15:50:10 GMT</pubDate></item><item><title><![CDATA[Reply to Stylesheets: Different background colors inside QTabBar on Fri, 02 Dec 2016 15:28:11 GMT]]></title><description><![CDATA[<p dir="auto">Unfortunately this didn't change anything. My stylesheets look like this:</p>
<ol>
<li>QMainWindow has</li>
</ol>
<pre><code>QMainWindow {
background: rgb(227,235,255);
border: 2px solid rgb(0, 0, 0);
}


QTabBar::tab {
background: rgb(200,210,235);
border: 2px solid rgb(160, 170, 220);
min-width: 64px;
padding: 4px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;

}

QTabBar { background: transparent; }

QTabWidget::pane {
border: 2px solid rgb(160, 170, 220);
}


QTabBar::tab:selected, QTabBar::tab:hover {
	background: rgb(227,235,255)
}
</code></pre>
<ol start="2">
<li>QTabWidget has</li>
</ol>
<pre><code>QWidget {
background: rgb(200,210,235);
}
</code></pre>
]]></description><link>https://forum.qt.io/post/362731</link><guid isPermaLink="true">https://forum.qt.io/post/362731</guid><dc:creator><![CDATA[__Alex__]]></dc:creator><pubDate>Fri, 02 Dec 2016 15:28:11 GMT</pubDate></item><item><title><![CDATA[Reply to Stylesheets: Different background colors inside QTabBar on Fri, 02 Dec 2016 14:32:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/__alex__">@<bdi>__Alex__</bdi></a><br />
try <code>QTabBar { background: transparent; }</code></p>
]]></description><link>https://forum.qt.io/post/362719</link><guid isPermaLink="true">https://forum.qt.io/post/362719</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Fri, 02 Dec 2016 14:32:34 GMT</pubDate></item></channel></rss>