<?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] If it is possible to set position:relative in setStyleSheet to QPushButton?]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I was wondering if there is possibility to set position:relative to QPushbutton using stylesheet, because I have tried this and nothing happens.</p>
<p dir="auto">@<br />
QString style = QString("QPushButton{") +<br />
"background-color: #3d94f6;" +<br />
"border: 1px solide #29569e;" +<br />
"border-radius: 5px;" +<br />
"background: qlineargradient(x1: 0, y1:0, x2: 0, y2: 1, " +<br />
"stop: 0 #3d94f6, stop: 1 #29569e);" +<br />
"font-family: arial;" +<br />
"font size: 12px;" +<br />
"}"+<br />
"QPushButton:hover{" +<br />
"background-color: #3d94f6;" +<br />
"border: 1px solide #29569e;" +<br />
"border-radius: 5px;" +<br />
"background: qlineargradient(x1: 0, y1:0, x2: 0, y2: 1, " +<br />
"stop: 0 #29569e, stop: 1 #3d94f6);" +<br />
"font-family: arial;" +<br />
"font size: 12px;" +<br />
"}"+<br />
"QPushButton:checked{" +<br />
"position:relative;" +<br />
"top: 3px;"+<br />
"background: qlineargradient(x1: 0, y1:0, x2: 0, y2: 1, " +<br />
"stop: 0 #29569e, stop: 1 #3d94f6);" +<br />
"}"<br />
@</p>
]]></description><link>https://forum.qt.io/topic/42940/solved-if-it-is-possible-to-set-position-relative-in-setstylesheet-to-qpushbutton</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 18:51:20 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/42940.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Jun 2014 07:48:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [solved] If it is possible to set position:relative in setStyleSheet to QPushButton? on Wed, 25 Jun 2014 08:52:56 GMT]]></title><description><![CDATA[<p dir="auto">It's a pity. So maybe I can change font size?</p>
<p dir="auto">EDIT: Ok, I get the same clicking effect by setting shadow to button and resizing font.</p>
]]></description><link>https://forum.qt.io/post/233393</link><guid isPermaLink="true">https://forum.qt.io/post/233393</guid><dc:creator><![CDATA[never_ever]]></dc:creator><pubDate>Wed, 25 Jun 2014 08:52:56 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] If it is possible to set position:relative in setStyleSheet to QPushButton? on Wed, 25 Jun 2014 08:26:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">AFAIK and unless I'm mistaken, the position keyword can only be used for sub controls</p>
]]></description><link>https://forum.qt.io/post/233381</link><guid isPermaLink="true">https://forum.qt.io/post/233381</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 25 Jun 2014 08:26:11 GMT</pubDate></item></channel></rss>