summaryrefslogtreecommitdiffstats
path: root/src/qml/types/types.pri
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-06-22 16:54:27 +0200
committerMitch Curtis <mitch.curtis@qt.io>2019-02-08 15:46:09 +0000
commit7fa5ef9e1ce87d9602c12d26442427c8604472ef (patch)
treec520467c672cf1e99bb51fd025fbbffa470d7176 /src/qml/types/types.pri
parentfb2fb95f8b6d23715728b702ccdb9ec5587872a9 (diff)
Add TableModel
This is a QML type that can be used as a model for the new TableView. The model data is set by assigning a JavaScript array to the rows property (or by calling appendRow()). After data has been assigned for the first time, the available columns and roles are fixed for the lifetime of the model, as opposed to ListModel where the dynamicRoles property could be used. This is done intentionally to simplify the code. The API is designed to be familiar to users of ListModel: - To add new rows, use appendRow() and insertRow(). - To modify existing rows, use setRow(), moveRow(), removeRow(), and clear(). [ChangeLog][Qt Labs QML Models] Added the TableModel QML type, a JavaScript-based model for the new TableView. Fixes: QTBUG-70334 Change-Id: I55387a08b122227c5624f78af3d450b7695d974a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/types/types.pri')
-rw-r--r--src/qml/types/types.pri6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/types/types.pri b/src/qml/types/types.pri
index e74c89b1f1..1765beb09e 100644
--- a/src/qml/types/types.pri
+++ b/src/qml/types/types.pri
@@ -6,7 +6,8 @@ SOURCES += \
$$PWD/qqmlobjectmodel.cpp \
$$PWD/qquickpackage.cpp \
$$PWD/qqmlinstantiator.cpp \
- $$PWD/qqmltableinstancemodel.cpp
+ $$PWD/qqmltableinstancemodel.cpp \
+ $$PWD/qqmltablemodel.cpp
HEADERS += \
$$PWD/qqmlbind_p.h \
@@ -17,7 +18,8 @@ HEADERS += \
$$PWD/qquickpackage_p.h \
$$PWD/qqmlinstantiator_p.h \
$$PWD/qqmlinstantiator_p_p.h \
- $$PWD/qqmltableinstancemodel_p.h
+ $$PWD/qqmltableinstancemodel_p.h \
+ $$PWD/qqmltablemodel_p.h
qtConfig(qml-worker-script) {
SOURCES += \