I've looked at tons of questions on SO about content margins in QML, but all the answers point to missing spacing: 0
properties. I've done all that, but still get weird spaces that I cannot eliminate. Can anyone explain why this QML code:
import QtQuick 2.7import QtQuick.Controls 2.0import QtQuick.Layouts 1.0ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Test") RowLayout { spacing: 0 anchors.margins: 0, 0, 0, 0 anchors.fill: parent; Pane { anchors.margins: 0, 0, 0, 0 id: menuPane anchors.top: parent.top; anchors.bottom: parent.bottom; width: 200 ColumnLayout { spacing: 0 anchors.fill: parent anchors.margins: 0, 0, 0, 0 Rectangle { id: testRect Layout.fillWidth: true anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right height: 20 color: "green" } } } Pane { anchors.margins: 0, 0, 0, 0 anchors.left: menuPane.right anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom Rectangle { anchors.margins: 0, 0, 0, 0 anchors.fill: parent color: "black" } } }}
is rendered like this?
Why are the margins between the rectangles there?