<?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[QPushButton pressed.]]></title><description><![CDATA[<p dir="auto">Hi to everyone, I put some buttons in Qt Creator, but I would like that when  I pressed it, this become with some oppacity so, the user can see which button he has pressed.</p>
<p dir="auto">I put this in the "Change styleSheet" part:</p>
<p dir="auto">#buenaVal{<br />
background-color:transparent;<br />
border-image: url(:/HappyFace.png);<br />
background: none;<br />
border:none;<br />
background-repeat: none;<br />
}<br />
#buenaVal:pressed{<br />
background-color:transparent;<br />
border-image: url(:/HappyFace.png);<br />
background: none;<br />
border:none;<br />
background-repeat: none;<br />
opacity:0.5<br />
}</p>
<p dir="auto">but it doesn't work...<br />
Could someone help me, please?<br />
thank youuu!</p>
]]></description><link>https://forum.qt.io/topic/80029/qpushbutton-pressed</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 17:08:06 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/80029.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Jun 2017 08:00:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QPushButton pressed. on Thu, 08 Jun 2017 08:20:44 GMT]]></title><description><![CDATA[<p dir="auto">Happy that it helped! You should mark the subject as solved.</p>
]]></description><link>https://forum.qt.io/post/398120</link><guid isPermaLink="true">https://forum.qt.io/post/398120</guid><dc:creator><![CDATA[ibia]]></dc:creator><pubDate>Thu, 08 Jun 2017 08:20:44 GMT</pubDate></item><item><title><![CDATA[Reply to QPushButton pressed. on Thu, 08 Jun 2017 07:50:19 GMT]]></title><description><![CDATA[<p dir="auto">Thank you a lot, I did!</p>
]]></description><link>https://forum.qt.io/post/398103</link><guid isPermaLink="true">https://forum.qt.io/post/398103</guid><dc:creator><![CDATA[patcs]]></dc:creator><pubDate>Thu, 08 Jun 2017 07:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to QPushButton pressed. on Thu, 08 Jun 2017 00:31:21 GMT]]></title><description><![CDATA[<p dir="auto">I do not understand very clearly the goal you want to achieve. If you just want to apply a style on the <em>#buenaVal</em> <strong>between the moment the user presses the button and until he releases it</strong>, then I think the code above should work.</p>
<p dir="auto">But, if you want to apply the style <strong>even if the the user has released the mouse</strong>, so the <em>:checked</em> pseudo state should be used instead of <em>:pressed</em>.</p>
<p dir="auto">Note : You do not have to repeat a style if it does not changes. I think that only the <em>opacity</em> property must be set.</p>
]]></description><link>https://forum.qt.io/post/398038</link><guid isPermaLink="true">https://forum.qt.io/post/398038</guid><dc:creator><![CDATA[ibia]]></dc:creator><pubDate>Thu, 08 Jun 2017 00:31:21 GMT</pubDate></item><item><title><![CDATA[Reply to QPushButton pressed. on Wed, 07 Jun 2017 09:36:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
you can probably use a PNG image that is half transparent for the pressed button.<br />
-Michael.</p>
]]></description><link>https://forum.qt.io/post/397871</link><guid isPermaLink="true">https://forum.qt.io/post/397871</guid><dc:creator><![CDATA[m.sue]]></dc:creator><pubDate>Wed, 07 Jun 2017 09:36:14 GMT</pubDate></item></channel></rss>