Adjust customers table layout

This commit is contained in:
2024-11-11 09:28:35 +01:00
parent 18c600c7c7
commit bde021c7d3
2 changed files with 10 additions and 9 deletions

View File

@@ -3,8 +3,9 @@ import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import Qt.labs.qmlmodels import Qt.labs.qmlmodels
Item { Item {
anchors.fill: parent
//color: "lightslategrey"
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"] property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
SearchBar SearchBar
@@ -15,6 +16,7 @@ Item {
ColumnLayout ColumnLayout
{ {
id: tableColumn
anchors anchors
{ {
@@ -22,7 +24,6 @@ Item {
bottom: parent.bottom bottom: parent.bottom
left: parent.left left: parent.left
right: parent.right right: parent.right
} }
RowLayout RowLayout
@@ -74,8 +75,6 @@ Item {
model: dbm model: dbm
selectionBehavior: TableView.SelectRows selectionBehavior: TableView.SelectRows
selectionModel: ItemSelectionModel selectionModel: ItemSelectionModel
{ {
id: selModel id: selModel
model: testTable.model model: testTable.model
@@ -86,7 +85,7 @@ Item {
{ {
required property bool selected required property bool selected
required property bool current required property bool current
implicitWidth: 200 implicitWidth: tableColumn.width / testTable.columns
implicitHeight: 25 implicitHeight: 25
color: selected? "lightblue": palette.base color: selected? "lightblue": palette.base
@@ -129,3 +128,4 @@ Item {

View File

@@ -1,4 +1,5 @@
import QtQuick import QtQuick
import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls