summaryrefslogtreecommitdiff
path: root/src/controls/doc/src/qtquickcontrols-examples.qdoc
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-11-04 14:38:54 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2014-11-06 12:01:03 +0100
commitcf26937de2910da16cb3299db5550ae16b926159 (patch)
treea093dcdab51cd345569a1633d0ce2f8a480609f4 /src/controls/doc/src/qtquickcontrols-examples.qdoc
parentd2439bede98e0f1eb42e8c44b997b1e5d29454e4 (diff)
downloadqtquickcontrols-cf26937de2910da16cb3299db5550ae16b926159.tar.gz
Revise the Table View example
A simple sortable and searchable table view example that also fits a mobile screen. The old "example" is demoted as a manual test app. Task-number: QTBUG-41253 Change-Id: I746c8e5871c35a184748abbb4427ca3d160ffc8e Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Diffstat (limited to 'src/controls/doc/src/qtquickcontrols-examples.qdoc')
-rw-r--r--src/controls/doc/src/qtquickcontrols-examples.qdoc32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/controls/doc/src/qtquickcontrols-examples.qdoc b/src/controls/doc/src/qtquickcontrols-examples.qdoc
index ca293df0..4e6fccb0 100644
--- a/src/controls/doc/src/qtquickcontrols-examples.qdoc
+++ b/src/controls/doc/src/qtquickcontrols-examples.qdoc
@@ -69,10 +69,34 @@
\brief An example for the TableView control.
\image qtquickcontrols-example-tableview.png
- This example shows how a \l{TableView} from \l{Qt Quick Controls}
- can be used together with different types of data models to display
- lists of information with support for scroll bars, selections and
- resizable header sections.
+ This example project demonstrates the usage of \l {TableView} from
+ \l{Qt Quick Controls} - a control to display one or more columns of
+ information from a data list model. The example includes a model
+ that supports sorting and filtering.
+
+ The C++ class, SortFilterProxyModel, is registered as a QML type
+ under the namespace, "\c{org.qtproject.example 1.0}".
+
+ The following snippets show how the type is registered under
+ a namespace and later imported by \e main.qml.
+
+ QML type registration:
+
+ \code
+ #include <QtQml/qqml.h>
+ ...
+ qmlRegisterType<SortFilterProxyModel>("org.qtproject.example", 1, 0, "SortFilterProxyModel");
+ ...
+ \endcode
+
+ QML namespace import:
+
+ \qml
+ import org.qtproject.example 1.0
+ \endqml
+
+ For more information about registering C++ classses as QML types, see
+ \l {Defining QML Types from C++}.
\include examples-run.qdocinc
*/