<?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[Transparent background: QChartView]]></title><description><![CDATA[<p dir="auto">I would like to create a QChartView with transparent background, I mean, no white default background.</p>
<p dir="auto">I tryed:</p>
<pre><code>legendView-&gt;setWindowFlags(Qt::FramelessWindowHint);
legendView-&gt;setAttribute(Qt::WA_NoSystemBackground);
legendView-&gt;setAttribute(Qt::WA_TranslucentBackground, true);
legendView-&gt;setAttribute(Qt::WA_TransparentForMouseEvents);
legendView-&gt;setWindowOpacity(0.5);
</code></pre>
<p dir="auto">and</p>
<pre><code>chart-&gt;setContentsMargins(0, 0, 0, 0);
chart-&gt;setBackgroundRoundness(0);
</code></pre>
<p dir="auto">But I got always the same white background.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/d1f55e5e-fd37-4cc8-a0e8-e0295010b921.png" alt="4af6927d-c792-4bb3-9d79-32eb1a66072b-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><strong>How can I do this?</strong></p>
]]></description><link>https://forum.qt.io/topic/108340/transparent-background-qchartview</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 00:01:10 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/108340.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Oct 2019 17:24:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transparent background: QChartView on Wed, 30 Oct 2019 21:35:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Try using <code>QChart::setBackgroundVisible</code>:</p>
<pre><code>chart-&gt;setBackgroundVisible(false);
</code></pre>
]]></description><link>https://forum.qt.io/post/559139</link><guid isPermaLink="true">https://forum.qt.io/post/559139</guid><dc:creator><![CDATA[SamurayH]]></dc:creator><pubDate>Wed, 30 Oct 2019 21:35:11 GMT</pubDate></item><item><title><![CDATA[Reply to Transparent background: QChartView on Thu, 31 Oct 2019 13:12:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/samurayh">@<bdi>SamurayH</bdi></a> Thank you so much! I'm looking for this line for hours in the Qt documentation...</p>
]]></description><link>https://forum.qt.io/post/559309</link><guid isPermaLink="true">https://forum.qt.io/post/559309</guid><dc:creator><![CDATA[fem_dev]]></dc:creator><pubDate>Thu, 31 Oct 2019 13:12:58 GMT</pubDate></item><item><title><![CDATA[Reply to Transparent background: QChartView on Wed, 30 Oct 2019 21:35:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Try using <code>QChart::setBackgroundVisible</code>:</p>
<pre><code>chart-&gt;setBackgroundVisible(false);
</code></pre>
]]></description><link>https://forum.qt.io/post/559139</link><guid isPermaLink="true">https://forum.qt.io/post/559139</guid><dc:creator><![CDATA[SamurayH]]></dc:creator><pubDate>Wed, 30 Oct 2019 21:35:11 GMT</pubDate></item></channel></rss>