Changed CustomerTable
This commit is contained in:
@@ -253,28 +253,10 @@ ColumnLayout
|
|||||||
Layout.fillWidth: true
|
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
|
Item
|
||||||
{
|
{
|
||||||
height: birthday.height
|
height: birthday.height + customerInfo.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
//color: "lightslategrey"
|
//color: "lightslategrey"
|
||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||||
|
id: test
|
||||||
|
|
||||||
SearchBar
|
SearchBar
|
||||||
{
|
{
|
||||||
@@ -71,9 +72,27 @@ Item {
|
|||||||
{
|
{
|
||||||
id: horizontalHeader
|
id: horizontalHeader
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: 40
|
||||||
movableColumns: true
|
movableColumns: true
|
||||||
syncView: testTable
|
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
|
TableView
|
||||||
@@ -135,16 +154,18 @@ Item {
|
|||||||
implicitHeight: 25
|
implicitHeight: 25
|
||||||
//color: selected? "lightblue": palette.base
|
//color: selected? "lightblue": palette.base
|
||||||
color: selected
|
color: selected
|
||||||
? "lightblue" //palette.highlight
|
? addBusinessBtn.palette.highlight //palette.highlight
|
||||||
: (testTable.alternatingRows && row % 2 !== 0
|
: (testTable.alternatingRows && row % 2 !== 0
|
||||||
? "lightslategray" // palette.base
|
? addBusinessBtn.palette.base // palette.base
|
||||||
: "lightsteelblue") //palette.alternateBase)
|
: addBusinessBtn.palette.alternateBase) //palette.alternateBase)
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
//Layout.fillWidth: true
|
//Layout.fillWidth: true
|
||||||
text: model.display
|
text: model.display
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
|
color: addBusinessBtn.palette.text
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea
|
MouseArea
|
||||||
@@ -159,9 +180,13 @@ Item {
|
|||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
dbm.onRowClicked(row)
|
dbm.onRowClicked(row)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
onEntered:
|
||||||
|
{
|
||||||
testTable.selectionModel.select(testTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
testTable.selectionModel.select(testTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user