I am trying to make my gridlayout responsive. It renders correctly when the window is created. If I try to maximize the application it leaves extra white spaces at the top and some at the bottom. I don't know how to fix this. Anyone have any ideas?
Correct:
Incorrect when maximized:
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
ApplicationWindow {
id: window
title: "Test"
width: 1366
height: 768
visible: true
GridLayout {
id : grid
anchors.fill: parent
rows : 2
columns : 2
rowSpacing: 0
columnSpacing: 0
Rectangle {
color : 'red'
width: 300
height: window.height - 100
}
Rectangle {
color : 'yellow'
height: window.height - 100
Layout.fillWidth: true
}
Rectangle {
color : 'green'
height: 100
Layout.fillWidth: true
Layout.columnSpan : 2
}
}
}

