<?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[Setting border on widget is inconsistent]]></title><description><![CDATA[<p dir="auto">in QtDesigner, when setting for example the following StyleSheet on a QLabel using the Property Editor</p>
<pre><code>QLabel {
 font-size: 26px;
 color: blue;
 border: 1px solid black;
}
</code></pre>
<p dir="auto">this is the result:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/029d81a0-828b-45c3-9cfd-bcf9e844f8fc.png" alt="97eacf3d-7668-4b82-b620-22e4777e95ac-image.png" class=" img-fluid img-markdown" /><br />
Notice how the left and top borders are relatively thinner than the bottom and right one, couldn't find any solution or similar post talking about this slight issue, and Thanks for your suggestions.</p>
]]></description><link>https://forum.qt.io/topic/164584/setting-border-on-widget-is-inconsistent</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 20:28:05 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164584.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Apr 2026 17:41:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Setting border on widget is inconsistent on Tue, 21 Apr 2026 10:28:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chris-kawa">@<bdi>Chris-Kawa</bdi></a> Thank you so much for all the help!</p>
]]></description><link>https://forum.qt.io/post/837908</link><guid isPermaLink="true">https://forum.qt.io/post/837908</guid><dc:creator><![CDATA[rida_zouga]]></dc:creator><pubDate>Tue, 21 Apr 2026 10:28:45 GMT</pubDate></item><item><title><![CDATA[Reply to Setting border on widget is inconsistent on Tue, 21 Apr 2026 01:29:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rida_zouga">@<bdi>rida_zouga</bdi></a>:</p>
<blockquote>
<p dir="auto">is there a fix for the resolutions causing a problem?</p>
</blockquote>
<p dir="auto">Well, it's not exactly a bug, so there's nothing to fix really. If you have a line width of 1px and you scale it to 1.5px you can't really color half a pixel (well, you could if you go into the RGB subpixels like font antialiasing does, but that's beyond the point), so you either round up, down or average brightness across all covered pixels. None of those is perfect in all scenarios, for example rounding down lines at oblique angles can lead to holes in the line and averaging can lead to widening or blurriness.</p>
<p dir="auto">The only thing you can do to avoid it is not use non-integer scale factors. Qt lets you choose if you want to use the system setting, ignore it completely or round up or down. Rounding down should let you keep the 1px borders intact, but keep in mind that it can lead to text and other elements look too small on some displays.<br />
See <a href="https://doc.qt.io/qt-6/qguiapplication.html#setHighDpiScaleFactorRoundingPolicy" target="_blank" rel="noopener noreferrer nofollow ugc">QGuiApplication::setHighDpiScaleFactorRoundingPolicy</a> for more details, but use with care and test on multiple different displays if possible.</p>
]]></description><link>https://forum.qt.io/post/837899</link><guid isPermaLink="true">https://forum.qt.io/post/837899</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Tue, 21 Apr 2026 01:29:04 GMT</pubDate></item><item><title><![CDATA[Reply to Setting border on widget is inconsistent on Mon, 20 Apr 2026 23:00:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chris-kawa">@<bdi>Chris-Kawa</bdi></a> Wow Thank you so much, my resolution was indeed 150% and that's why the border was not consistent <em>(along other quirks too)</em>, but as soon as I changed to 100% the border works perfectly well, though I guess now is there a fix for the resolutions causing a problem? and Thank you once again.</p>
]]></description><link>https://forum.qt.io/post/837898</link><guid isPermaLink="true">https://forum.qt.io/post/837898</guid><dc:creator><![CDATA[rida_zouga]]></dc:creator><pubDate>Mon, 20 Apr 2026 23:00:52 GMT</pubDate></item><item><title><![CDATA[Reply to Setting border on widget is inconsistent on Mon, 20 Apr 2026 21:42:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rida_zouga">@<bdi>rida_zouga</bdi></a> What's your scaling setting in the system's monitor options? This can happen with non-integer multipliers, e.g 125% or 150%. At those scaling values 1px lines become slightly larger (e.g. 1.25px), and depending on where they fall on the grid they can end up being averaged across 2 pixels.</p>
]]></description><link>https://forum.qt.io/post/837897</link><guid isPermaLink="true">https://forum.qt.io/post/837897</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Mon, 20 Apr 2026 21:42:21 GMT</pubDate></item><item><title><![CDATA[Reply to Setting border on widget is inconsistent on Mon, 20 Apr 2026 19:48:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> I am using Qt version 6.10.2 on windows 10, and thank you.</p>
]]></description><link>https://forum.qt.io/post/837896</link><guid isPermaLink="true">https://forum.qt.io/post/837896</guid><dc:creator><![CDATA[rida_zouga]]></dc:creator><pubDate>Mon, 20 Apr 2026 19:48:32 GMT</pubDate></item><item><title><![CDATA[Reply to Setting border on widget is inconsistent on Mon, 20 Apr 2026 18:48:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Which version of Qt are you using ?<br />
On which OS ?</p>
]]></description><link>https://forum.qt.io/post/837892</link><guid isPermaLink="true">https://forum.qt.io/post/837892</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 20 Apr 2026 18:48:09 GMT</pubDate></item></channel></rss>