Adjust customers table layout
This commit is contained in:
@@ -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,19 +75,17 @@ Item {
|
|||||||
model: dbm
|
model: dbm
|
||||||
selectionBehavior: TableView.SelectRows
|
selectionBehavior: TableView.SelectRows
|
||||||
selectionModel: ItemSelectionModel
|
selectionModel: ItemSelectionModel
|
||||||
|
{
|
||||||
|
id: selModel
|
||||||
{
|
model: testTable.model
|
||||||
id: selModel
|
}
|
||||||
model: testTable.model
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
delegate:Rectangle
|
delegate:Rectangle
|
||||||
{
|
{
|
||||||
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 {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user