Changed CustomerTable
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user