<?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[QSpinBox behaves strangely when padding is set]]></title><description><![CDATA[<p dir="auto">in QtDesigner, I am styling a QSpinBox with just simply padding: 5px, but this happens when cursor enters or leaves the QSpinBox:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/60a9a1c7-dacd-4667-86b8-1f455b426d48.png" alt="413c7b28-8876-45b1-b05a-cc638df29a37-image.png" class=" img-fluid img-markdown" /><br />
I hope you can see that gray kind of padding surrounding it <em>(since I can't post an .avif which shows better the flickering)</em>. I tried manipulating the values exactly as well as demonstrated in <a href="https://doc.qt.io/qt-6/stylesheet-examples.html#customizing-qspinbox" target="_blank" rel="noopener noreferrer nofollow ugc">qt documentation</a> like this:</p>
<pre><code>QSpinBox {
	font-size: 18px;
	border-width: 1px;
	padding: 5px;
}

QSpinBox::up-button {
    subcontrol-origin: border;
    subcontrol-position: top right; /* position at the top right corner */
    width: 4px; /* 4 + 2*1px border-width = 5px padding + 1px parent border */
    border-width: 1px;
}

QSpinBox::down-button {
    subcontrol-origin: border;
    subcontrol-position: bottom right; /* position at the top right corner */
    width: 4px; /* 4 + 2*1px border-width = 5px padding + 1px parent border */
    border-width: 1px;
}
</code></pre>
<p dir="auto">but this completly hides the up and down buttons and so is the border of QSpinBox and couldn't find any similar issue out there.</p>
]]></description><link>https://forum.qt.io/topic/164738/qspinbox-behaves-strangely-when-padding-is-set</link><generator>RSS for Node</generator><lastBuildDate>Sat, 20 Jun 2026 11:29:27 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164738.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Jun 2026 14:51:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QSpinBox behaves strangely when padding is set on Mon, 01 Jun 2026 20:19:48 GMT]]></title><description><![CDATA[<p dir="auto">So it's the windowsvista style. I can reproduce it but no idea how to fix it. You might create a bug report -&gt; <a href="http://bugreports.qt.io" target="_blank" rel="noopener noreferrer nofollow ugc">bugreports.qt.io</a></p>
]]></description><link>https://forum.qt.io/post/838510</link><guid isPermaLink="true">https://forum.qt.io/post/838510</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 01 Jun 2026 20:19:48 GMT</pubDate></item><item><title><![CDATA[Reply to QSpinBox behaves strangely when padding is set on Mon, 01 Jun 2026 17:55:26 GMT]]></title><description><![CDATA[<p dir="auto">using windows 10, and for style not using anything at all, so default for windows 10 I suppose</p>
]]></description><link>https://forum.qt.io/post/838508</link><guid isPermaLink="true">https://forum.qt.io/post/838508</guid><dc:creator><![CDATA[rida_zouga]]></dc:creator><pubDate>Mon, 01 Jun 2026 17:55:26 GMT</pubDate></item><item><title><![CDATA[Reply to QSpinBox behaves strangely when padding is set on Mon, 01 Jun 2026 17:43:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rida_zouga">@<bdi>rida_zouga</bdi></a> said in <a href="/post/838506">QSpinBox behaves strangely when padding is set</a>:</p>
<blockquote>
<p dir="auto">don't know what you mean by style</p>
</blockquote>
<p dir="auto">Style: <a href="https://doc.qt.io/qt-6/qapplication.html#setStyle" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/qapplication.html#setStyle</a><br />
What OS do you use?</p>
]]></description><link>https://forum.qt.io/post/838507</link><guid isPermaLink="true">https://forum.qt.io/post/838507</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 01 Jun 2026 17:43:03 GMT</pubDate></item><item><title><![CDATA[Reply to QSpinBox behaves strangely when padding is set on Mon, 01 Jun 2026 17:39:58 GMT]]></title><description><![CDATA[<p dir="auto">I don't know what you mean by style but for monitor scaling even though I changed it to 100% still the same effect</p>
]]></description><link>https://forum.qt.io/post/838506</link><guid isPermaLink="true">https://forum.qt.io/post/838506</guid><dc:creator><![CDATA[rida_zouga]]></dc:creator><pubDate>Mon, 01 Jun 2026 17:39:58 GMT</pubDate></item><item><title><![CDATA[Reply to QSpinBox behaves strangely when padding is set on Mon, 01 Jun 2026 16:42:16 GMT]]></title><description><![CDATA[<p dir="auto">What style do you use and did you enable scaling for your monitor?</p>
]]></description><link>https://forum.qt.io/post/838505</link><guid isPermaLink="true">https://forum.qt.io/post/838505</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 01 Jun 2026 16:42:16 GMT</pubDate></item></channel></rss>