Changed CustomerTable

This commit is contained in:
2024-11-13 12:50:27 +01:00
parent f6dd06e4df
commit b0299596ab
2 changed files with 32 additions and 25 deletions

View File

@@ -253,28 +253,10 @@ ColumnLayout
Layout.fillWidth: true
}
Label
{
text: qsTr("Info")
Layout.alignment: Qt.AlignRight | Qt.AlignTop
}
ScrollView
{
Layout.fillWidth: true
Layout.preferredHeight: 100
TextArea
{
id: contactInfo
background: Rectangle
{
color: contactInfo.palette.base
border.color: contactInfo.activeFocus? contactInfo.palette.highlight: contactInfo.palette.base
}
}
}
Item
{
height: birthday.height
height: birthday.height + customerInfo.height
}
}
}

View File

@@ -7,6 +7,7 @@ Item {
anchors.fill: parent
//color: "lightslategrey"
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
id: test
SearchBar
{
@@ -71,9 +72,27 @@ Item {
{
id: horizontalHeader
Layout.fillWidth: true
implicitHeight: 40
movableColumns: true
syncView: testTable
delegate: Rectangle {
color: addBusinessBtn.palette.alternateBase
border.color: addBusinessBtn.palette.base
implicitHeight: 40
Layout.fillWidth: true
implicitWidth: 1
Text
{
text: model.display
elide: Text.ElideRight
width: parent.width
height: parent.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: addBusinessBtn.palette.text
}
}
}
TableView
@@ -135,16 +154,18 @@ Item {
implicitHeight: 25
//color: selected? "lightblue": palette.base
color: selected
? "lightblue" //palette.highlight
? addBusinessBtn.palette.highlight //palette.highlight
: (testTable.alternatingRows && row % 2 !== 0
? "lightslategray" // palette.base
: "lightsteelblue") //palette.alternateBase)
? addBusinessBtn.palette.base // palette.base
: addBusinessBtn.palette.alternateBase) //palette.alternateBase)
Text
{
//Layout.fillWidth: true
text: model.display
elide: Text.ElideRight
width: parent.width
color: addBusinessBtn.palette.text
}
MouseArea
@@ -159,9 +180,13 @@ Item {
onClicked:
{
dbm.onRowClicked(row)
}
onEntered:
{
testTable.selectionModel.select(testTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
}
}
}