<?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[QQuickView as transparent with parent window.]]></title><description><![CDATA[<p dir="auto">I have QQuickView window for QML, and it has QWindow as parent window, so the QQuickView is inside the parent window. I would like to get this QQuickView window as transparent, but when I set it to transparent as child window for QWindow, it is black. But if it is as own window, it is totally transparent as should.</p>
<p dir="auto">There is code example:</p>
<p dir="auto">@int main (int argc, char *argv[]) {<br />
QGuiApplication app(argc, argv);</p>
<pre><code>    QWindow window;
    window.resize(800, 640);
    window.show();
    
    QQuickView view;
    view.setSource(QUrl::fromLocalFile&amp;#40;"qml/main.qml"&amp;#41;);
    
    QSurfaceFormat surfaceFormat;
    surfaceFormat.setAlphaBufferSize(8);
    view.setFormat(surfaceFormat);
    
    view.setClearBeforeRendering(true);
    view.setColor(QColor(Qt::transparent));
    view.setParent(&amp;window);
    view.show();
    
    return app.exec();
</code></pre>
<p dir="auto">}@</p>
<p dir="auto">And main.qml:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/import">@<bdi>import</bdi></a> QtQuick 2.0</p>
<p dir="auto">Rectangle {</p>
<pre><code>width: 300
height: 300
color: "#00000000" 
Text {
    id: label
    color: "red"
    text: "TEST"
    y: 240
    x: 160
}
</code></pre>
<p dir="auto">}@</p>
<p dir="auto">I use Linux desktop with Qt 5.0.1 and Qt Quick2. It doesn't matter if the parent window is also a QQuickView instead of QWindow.</p>
]]></description><link>https://forum.qt.io/topic/27928/qquickview-as-transparent-with-parent-window</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 14:58:07 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/27928.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Jun 2013 18:55:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QQuickView as transparent with parent window. on Sun, 27 Apr 2014 11:40:03 GMT]]></title><description><![CDATA[<p dir="auto">I'm sorry mchiasson, but I found another way to do my thing, without need of transparency.</p>
<p dir="auto">I wish you luck to get it work!</p>
]]></description><link>https://forum.qt.io/post/201348</link><guid isPermaLink="true">https://forum.qt.io/post/201348</guid><dc:creator><![CDATA[Jjompu]]></dc:creator><pubDate>Sun, 27 Apr 2014 11:40:03 GMT</pubDate></item><item><title><![CDATA[Reply to QQuickView as transparent with parent window. on Sat, 26 Apr 2014 21:21:48 GMT]]></title><description><![CDATA[<p dir="auto">Everything works fine if I comment out this line</p>
<p dir="auto">@<a href="//view.setParent" target="_blank" rel="noopener noreferrer nofollow ugc">//view.setParent</a>(&amp;window);@</p>
<p dir="auto">... but you end up with two separate windows.</p>
<p dir="auto">Also, this solution doesn't seem to work at all on Android The QQuickView instance doesn't seem to show up at all.  Works fine on Linux (minus the missing transparency).  I'm using Qt 5.2.1 on Ubuntu 14.04</p>
]]></description><link>https://forum.qt.io/post/201345</link><guid isPermaLink="true">https://forum.qt.io/post/201345</guid><dc:creator><![CDATA[mchiasson]]></dc:creator><pubDate>Sat, 26 Apr 2014 21:21:48 GMT</pubDate></item><item><title><![CDATA[Reply to QQuickView as transparent with parent window. on Sat, 26 Apr 2014 16:26:49 GMT]]></title><description><![CDATA[<p dir="auto">Any luck Jjompu?  I found your post because I've been trying to do pretty much the same thing. I prefer a QWindow rather than QGLWidget.</p>
]]></description><link>https://forum.qt.io/post/201344</link><guid isPermaLink="true">https://forum.qt.io/post/201344</guid><dc:creator><![CDATA[mchiasson]]></dc:creator><pubDate>Sat, 26 Apr 2014 16:26:49 GMT</pubDate></item><item><title><![CDATA[Reply to QQuickView as transparent with parent window. on Wed, 05 Jun 2013 06:49:45 GMT]]></title><description><![CDATA[<p dir="auto">Peter:<br />
For QWindow there is not setColor function available. The question is that how can I get that child window transparent.</p>
<p dir="auto">belab:<br />
I've seen that already, it uses QWidget. And I would like to go without widgets, because they are just an extra layer, which I don't need. But I'll check it more deeper if it is still usable some way. Or I will use that if there is not another solution.</p>
]]></description><link>https://forum.qt.io/post/181638</link><guid isPermaLink="true">https://forum.qt.io/post/181638</guid><dc:creator><![CDATA[Jjompu]]></dc:creator><pubDate>Wed, 05 Jun 2013 06:49:45 GMT</pubDate></item><item><title><![CDATA[Reply to QQuickView as transparent with parent window. on Tue, 04 Jun 2013 20:48:38 GMT]]></title><description><![CDATA[<p dir="auto">I found a nice example here:<br />
<a href="http://stackoverflow.com/questions/14009549/how-to-make-a-transparent-window-with-qt-quick-2-0" target="_blank" rel="noopener noreferrer nofollow ugc">http://stackoverflow.com/questions/14009549/how-to-make-a-transparent-window-with-qt-quick-2-0</a><br />
It's working with qt5+opengl on win7.</p>
]]></description><link>https://forum.qt.io/post/181579</link><guid isPermaLink="true">https://forum.qt.io/post/181579</guid><dc:creator><![CDATA[belab]]></dc:creator><pubDate>Tue, 04 Jun 2013 20:48:38 GMT</pubDate></item><item><title><![CDATA[Reply to QQuickView as transparent with parent window. on Tue, 04 Jun 2013 19:19:24 GMT]]></title><description><![CDATA[<p dir="auto">I am not sure I understand your question.  Have you also tried:</p>
<p dir="auto">@window.setColor(QColor(Qt::transparent));<br />
@</p>
<p dir="auto">?</p>
<p dir="auto">Peter</p>
]]></description><link>https://forum.qt.io/post/181563</link><guid isPermaLink="true">https://forum.qt.io/post/181563</guid><dc:creator><![CDATA[donjuedo]]></dc:creator><pubDate>Tue, 04 Jun 2013 19:19:24 GMT</pubDate></item></channel></rss>