aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/tableview/tablemodel/tablemodel.pro
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 /tests/manual/tableview/tablemodel/tablemodel.pro
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 'tests/manual/tableview/tablemodel/tablemodel.pro')
-rw-r--r--tests/manual/tableview/tablemodel/tablemodel.pro10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/manual/tableview/tablemodel/tablemodel.pro b/tests/manual/tableview/tablemodel/tablemodel.pro
new file mode 100644
index 0000000000..f6100276a1
--- /dev/null
+++ b/tests/manual/tableview/tablemodel/tablemodel.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+TARGET = tableview_tablemodel
+QT += qml quick
+SOURCES += main.cpp
+RESOURCES += main.qml RowForm.qml
+
+# Default rules for deployment.
+qnx: target.path = /tmp/$${TARGET}/bin
+else: unix:!android: target.path = /opt/$${TARGET}/bin
+!isEmpty(target.path): INSTALLS += target