This commit is contained in:
2025-03-25 00:24:28 +01:00
6 changed files with 25 additions and 46 deletions

View File

@@ -5,13 +5,13 @@ import Qt.labs.qmlmodels
Item {
property var availableFilters: [""]
anchors.fill: parent
StackView
{
id: objectsStack
anchors.fill: parent
initialItem: "ObjectsTable.qml"
anchors.topMargin: Dimensions.m
}
}

View File

@@ -5,6 +5,9 @@ import Qt.labs.qmlmodels
ColumnLayout
{
anchors.fill: parent
spacing: Dimensions.l
function viewCriterion(criterion)
{
business_model.viewCriterion(criterion.text);
@@ -15,8 +18,6 @@ ColumnLayout
if (added) object_model.viewCriterion("")
}
anchors.fill: parent
Component.onCompleted:
{
contact_model.objectContactAdded.connect(onObjectContactAdded)
@@ -24,9 +25,10 @@ ColumnLayout
}
RowLayout
{
Layout.fillWidth: true
spacing: Dimensions.l
SearchBar
{
}
QuickFilter {
onSelectedChanged: (name) => {
@@ -76,6 +78,9 @@ ColumnLayout
ColumnLayout
{
id: tableColumn
Layout.fillWidth: true
Layout.fillHeight: true
Layout.verticalStretchFactor: 1
clip: true
// anchors
// {
@@ -90,7 +95,6 @@ ColumnLayout
id: horizontalHeaderview
Layout.fillWidth: true
implicitHeight: 40
//visible: false
movableColumns: true //@disable-check M16
syncView: objectTable
@@ -175,40 +179,9 @@ ColumnLayout
}
}
}
// onContentWidthChanged:
// {
// redrawTable.start()
// }
}
Item {
Layout.fillWidth: true
}
}
Item
{
Layout.fillHeight: true
}
// function onObjectContactAdded(added)
// {
// console.log(added)
// if (added) object_model.viewCriterion("")
// }
// function viewCriterion(criterion)
// {
// object_model.viewCriterion(criterion.text)
// }
// Component.onCompleted:
// {
// contact_model.objectContactAdded.connect(onObjectContactAdded)
// objectsStack.pop()
// }
// function onObjectContactAdded(added)
// {
// console.log(added)
// if (added) object_model.viewCriterion("")
// }
}

View File

@@ -6,12 +6,13 @@ import Qt.labs.qmlmodels
Item
{
anchors.fill: parent
StackView
{
id: employeesStack
id: offersStack
anchors.fill: parent
initialItem: "OffersTable.qml"
anchors.topMargin: Dimensions.m
}
}