QtQuick Layouts columnSpan
Unsolved
QML and Qt Quick
-
Hello,
I'm trying to use a GridLayout. The latter has 3 columns and 1 row. I added two Rectangles, of respective columnSpans 2 and 1. Here's my code:
import QtQuick import QtQuick.Layouts 1.3 GridLayout { id: gridLayout columns: 3 rows: 1 anchors.fill: parent anchors.margins: 16 rowSpacing: 4 Rectangle { Layout.columnSpan: 2 height: 280 color: "#111" Layout.fillWidth: true } Rectangle { Layout.columnSpan: 1 height: 280 color: "#111" Layout.fillWidth: true } }
What I expected was that the first Rectangle would take up 66.6% of the available space, and the remainder would be left to the second Rectangle to use. However, instead, I get this:
If anyone can enlighten me as to why they are the same size, it would be much appreciated. Thanks in advance.