Hur kan man få en cell i TableView responsiv mot ökad fönsterstorlek?
Jag har denna kod.
import QtQuick
import QtQuick.Controls 6.3
import QtQuick.Layouts 6.3
import QtQuick.Controls.Windows 6.0
import QtQuick3D 6.3
import Qt.labs.qmlmodels 1.0
Window {
id: window
width: 250
height: 480
visible: true
title: qsTr("Hello World")
Row {
id: row
width: window.width
height: window.height
Column {
id: column1
width: 50
height: window.height
topPadding: 0
spacing: 0
Rectangle {
id: rectangle
width: column1.width
height: column1.width
color: "#fc0909"
border.width: 0
}
Rectangle {
id: rectangle1
width: column1.width
height: column1.width
color: "#0d01ff"
border.width: 0
}
}
SwipeView {
id: swipeView
width: window.width - column1.width
height: window.height
Column {
id: column
x: 175
y: 0
width: swipeView.width
height: window.height
TableView {
width: column.width
height: window.height - addItemToStockList.height
columnSpacing: 1
rowSpacing: 1
clip: true
model: TableModel {
TableModelColumn { display: "name" }
TableModelColumn { display: "color" }
rows: [
{
"name": "cat",
"color": "black"
},
{
"name": "dog",
"color": "brown"
},
{
"name": "bird",
"color": "white"
}
]
}
delegate: Rectangle {
implicitWidth: 100
implicitHeight: 50
border.width: 1
Text {
text: display
anchors.centerIn: parent
}
}
}
Rectangle {
id: addItemToStockList
width: swipeView.width
height: column1.width
color: "yellow"
border.width: 0
}
}
}
}
Item {
id: __materialLibrary__
}
}
Denna kod ger detta. Som ni ser så vill jag att tabellen följer med också. Men den gör inte det...varför?

Det jag måste ändra är denna del.
delegate: Rectangle {
implicitWidth: 100
implicitHeight: 50
border.width: 1
Text {
text: display
anchors.centerIn: parent
}
}
Hur vad ska jag skriva så att bredden (width) och höjden (height) blir responsiv?