mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
Add replacement for QT.labs.models.TableModel
Implementation is intended to function the same as before. CURA-8640
This commit is contained in:
parent
359bcc1bee
commit
4ec2edec67
3 changed files with 13 additions and 16 deletions
|
@ -1,11 +1,11 @@
|
|||
//Copyright (c) 2022 Ultimaker B.V.
|
||||
//Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import Qt.labs.qmlmodels 1.0
|
||||
//import Qt.labs.qmlmodels 1.0
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import UM 1.5 as UM
|
||||
import UM 1.6 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
Cura.TableView
|
||||
|
@ -39,13 +39,11 @@ Cura.TableView
|
|||
catalog.i18nc("@title:column", "Current"),
|
||||
catalog.i18nc("@title:column Unit of measurement", "Unit")
|
||||
]
|
||||
model: TableModel
|
||||
|
||||
model: UM.TableModel
|
||||
{
|
||||
id: tableModel
|
||||
TableModelColumn { display: "label" }
|
||||
TableModelColumn { display: "profile_value" }
|
||||
TableModelColumn { display: "user_value" }
|
||||
TableModelColumn { display: "unit" }
|
||||
headers: ["label", "profile_value", "user_value", "unit"]
|
||||
rows: modelRows
|
||||
}
|
||||
sectionRole: "category"
|
||||
|
|
|
@ -56,8 +56,9 @@ Item
|
|||
font: UM.Theme.getFont("medium_bold")
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
Item //Resize handle.
|
||||
Item
|
||||
{
|
||||
//Resize handle.
|
||||
anchors
|
||||
{
|
||||
right: parent.right
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue