Part of QML Rectangle is not drawn correctly under Linux environment
-
Hello.
I'm developing GUI for a linux machine in VirtualBox.
I happened to notice the following phenomenon.
Sometimes one (or more) of the four sides of the Rectangle is missing about a pixel.
It may disappear when it is first displayed, or it may disappear when I switch App themes or press a button.Curiously, that didn't happen in the Windows environment.
Here is an example of that phenomenon.
I have defined an orange Rectangle and a blue Border.
In the Windows environment, the blue border is drawn correctly.
However, in the Linux environment, the upper border is not drawn.[Windows]

[Linux]

Here is the simplified code
Page { id: root title: qsTr('Main Menu') Rectangle{ width:30 height:30 color: "orange" border.width: 1 border.color: "blue" } …I don't understand why this difference happens.
Does anyone know the solution?
Thank you. -
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:
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") } } }