<?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[Part of QML Rectangle is not drawn correctly under Linux environment]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">I'm developing GUI for a linux machine in VirtualBox.</p>
<p dir="auto">I happened to notice the following phenomenon.<br />
Sometimes one (or more) of the four sides of the Rectangle is missing about a pixel.<br />
It may disappear when it is first displayed, or it may disappear when I switch App themes or press a button.</p>
<p dir="auto">Curiously, that didn't happen in the Windows environment.</p>
<p dir="auto">Here is an example of that phenomenon.</p>
<p dir="auto">I have defined an orange Rectangle and a blue Border.<br />
In the Windows environment, the blue border is drawn correctly.<br />
However, in the Linux environment, the upper border is not drawn.</p>
<p dir="auto">[Windows]<br />
<img src="https://ddgobkiprc33d.cloudfront.net/e589c782-a046-4f72-9198-bf35b447694b.png" alt="ab749107-718a-491b-aa92-e51dec400250-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">[Linux]<br />
<img src="https://ddgobkiprc33d.cloudfront.net/866f37a0-ace4-460a-ad7d-cf508b5ee89c.png" alt="8a56a11e-5f00-47b9-b4f2-a60a0c11c54a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Here is the simplified code</p>
<pre><code>Page {
    id: root
    title: qsTr('Main Menu')

    Rectangle{
        width:30
        height:30
        color: "orange"
        border.width: 1
        border.color: "blue"
    }
　…
</code></pre>
<p dir="auto">I don't understand why this difference happens.<br />
Does anyone know the solution?<br />
Thank you.</p>
]]></description><link>https://forum.qt.io/topic/138173/part-of-qml-rectangle-is-not-drawn-correctly-under-linux-environment</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 04:36:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/138173.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Jul 2022 05:10:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Part of QML Rectangle is not drawn correctly under Linux environment on Tue, 26 Jul 2022 08:10:10 GMT]]></title><description><![CDATA[<p dir="auto">Please post a complete QML file that demonstrates the problem.  This looks like the border of the header is overlaying the border of the rectangle.  This example does not demonstrate the problem (Linux, Qt 6.3.1) for me:</p>
<pre><code>import QtQuick
import QtQuick.Controls

ApplicationWindow {
    visible: true
    width: 400
    height: 400

    header: Label {
        text: view.currentItem.title
        horizontalAlignment: Text.AlignHCenter
    }

    SwipeView {
        id: view
        anchors.fill: parent

        Page {
            title: qsTr("Main Menu")

            Rectangle{
                width:30
                height:30
                color: "orange"
                border.width: 1
                border.color: "blue"
            }
        }
        Page {
            title: qsTr("Page 2")
        }
        Page {
            title: qsTr("Page 3")
        }
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/722690</link><guid isPermaLink="true">https://forum.qt.io/post/722690</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Tue, 26 Jul 2022 08:10:10 GMT</pubDate></item></channel></rss>