diff --git a/gui/CustomerTables.qml b/gui/CustomerTables.qml index cef8d80..5bcc737 100644 --- a/gui/CustomerTables.qml +++ b/gui/CustomerTables.qml @@ -3,8 +3,9 @@ import QtQuick.Layouts import QtQuick.Controls import Qt.labs.qmlmodels - Item { + anchors.fill: parent + //color: "lightslategrey" property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"] SearchBar @@ -15,6 +16,7 @@ Item { ColumnLayout { + id: tableColumn anchors { @@ -22,7 +24,6 @@ Item { bottom: parent.bottom left: parent.left right: parent.right - } RowLayout @@ -74,19 +75,17 @@ Item { model: dbm selectionBehavior: TableView.SelectRows selectionModel: ItemSelectionModel - - - { - id: selModel - model: testTable.model - } + { + id: selModel + model: testTable.model + } delegate:Rectangle { required property bool selected required property bool current - implicitWidth: 200 + implicitWidth: tableColumn.width / testTable.columns implicitHeight: 25 color: selected? "lightblue": palette.base @@ -129,3 +128,4 @@ Item { + diff --git a/gui/main.qml b/gui/main.qml index b635056..06a40e4 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Layouts import QtQuick.Controls