<?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[[SOLVED] How would you set an alpha &quot;texture&quot; for QBrush?]]></title><description><![CDATA[<p dir="auto">I'm developing a custom color picker for an OpenGL application and I'm using QGraphicsView to preview the changes of color the user inputs. Since I have 4 sliders (one per channel) that alter the resulting color, I realized that if I moved the alpha one to zero, the preview will turn white. I would like it to turn something else, like that common squared texture from image editors like Gimp.</p>
<p dir="auto">Is there any way to achieve this with QBrush?</p>
]]></description><link>https://forum.qt.io/topic/51554/solved-how-would-you-set-an-alpha-texture-for-qbrush</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 08:33:23 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/51554.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Feb 2015 22:36:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] How would you set an alpha &quot;texture&quot; for QBrush? on Mon, 23 Feb 2015 23:47:40 GMT]]></title><description><![CDATA[<p dir="auto">You're right.</p>
<p dir="auto">I forgot I was using a QBrush for the background, so I could use one for the foreground too. By setting a texture for the background one and tweaking the foreground colors I achieved what I was looking for.</p>
<p dir="auto">Thanks SGaist!</p>
]]></description><link>https://forum.qt.io/post/262734</link><guid isPermaLink="true">https://forum.qt.io/post/262734</guid><dc:creator><![CDATA[BlastDV]]></dc:creator><pubDate>Mon, 23 Feb 2015 23:47:40 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] How would you set an alpha &quot;texture&quot; for QBrush? on Mon, 23 Feb 2015 23:25:50 GMT]]></title><description><![CDATA[<p dir="auto">Then what about QBrush::setTexture ?</p>
]]></description><link>https://forum.qt.io/post/262728</link><guid isPermaLink="true">https://forum.qt.io/post/262728</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 23 Feb 2015 23:25:50 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] How would you set an alpha &quot;texture&quot; for QBrush? on Mon, 23 Feb 2015 23:03:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi SGaist,</p>
<p dir="auto">No, what I would like to achieve is to show a texture on the background as the alpha channel reduces.</p>
<p dir="auto">Just as the background of this picture:<br />
<a href="http://www.cgmotionbox.com/wp-content/uploads/2011/11/Rendering-A-File-With-An-Alpha-Channel-In-After-Effects.gif" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.cgmotionbox.com/wp-content/uploads/2011/11/Rendering-A-File-With-An-Alpha-Channel-In-After-Effects.gif</a></p>
]]></description><link>https://forum.qt.io/post/262719</link><guid isPermaLink="true">https://forum.qt.io/post/262719</guid><dc:creator><![CDATA[BlastDV]]></dc:creator><pubDate>Mon, 23 Feb 2015 23:03:06 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] How would you set an alpha &quot;texture&quot; for QBrush? on Mon, 23 Feb 2015 22:57:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Are you thinking for something like :<br />
@QBrush(QColor(0, 0, 255, 128))@<br />
?</p>
<p dir="auto">It should give you a half-transparent blue brush.</p>
]]></description><link>https://forum.qt.io/post/262718</link><guid isPermaLink="true">https://forum.qt.io/post/262718</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 23 Feb 2015 22:57:11 GMT</pubDate></item></channel></rss>