<?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[How to set QSlider::handle to round ?]]></title><description><![CDATA[<p dir="auto">Why my handle is an ellipse, I want a circle handle.</p>
<pre><code>setStyleSheet("QSlider::sub-page:Horizontal { background-color: #9F2425; }"
              "QSlider::add-page:Horizontal { background-color: #333333; }"
              "QSlider::groove:Horizontal { background: transparent; height:4px; }"
              "QSlider::handle:Horizontal { width:10px; border-radius:5px; background:#9F2425; margin: -5px 0px -5px 0px; }");
</code></pre>
<p dir="auto"><img src="http://wx3.sinaimg.cn/large/66ad7667ly1fnx9q1lxdsj20rs0jg0tn.jpg" alt="替代文字" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/87256/how-to-set-qslider-handle-to-round</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 01:36:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/87256.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jan 2018 02:30:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set QSlider::handle to round ? on Mon, 29 Jan 2018 12:50:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a>,</p>
<p dir="auto">Just adjust width and radius of slider handle<br />
width 11px; radius:5px;</p>
]]></description><link>https://forum.qt.io/post/439128</link><guid isPermaLink="true">https://forum.qt.io/post/439128</guid><dc:creator><![CDATA[Vinod Kuntoji]]></dc:creator><pubDate>Mon, 29 Jan 2018 12:50:03 GMT</pubDate></item><item><title><![CDATA[Reply to How to set QSlider::handle to round ? on Mon, 29 Jan 2018 11:53:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> This is how I achieved a circular handle:</p>
<pre><code>QSlider::groove:horizontal { 
	background-color: black;
	border: 0px solid #424242; 
	height: 10px; 
	border-radius: 4px;
}

QSlider::handle:horizontal { 
	background-color: red; 
	border: 2px solid red; 
	width: 16px; 
	height: 20px; 
	line-height: 20px; 
	margin-top: -5px; 
	margin-bottom: -5px; 
	border-radius: 10px; 
}

QSlider::handle:horizontal:hover { 
	border-radius: 10px;
}
</code></pre>
<p dir="auto">The handle is a little larger than what you want but tweak the parameters where necessary.</p>
]]></description><link>https://forum.qt.io/post/439123</link><guid isPermaLink="true">https://forum.qt.io/post/439123</guid><dc:creator><![CDATA[webzoid]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:53:35 GMT</pubDate></item></channel></rss>