From a9aa500a680058d7f2a75f02ad8d72c4b1e49f7c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 18 Jan 2017 16:29:14 +0100 Subject: Add ScrollView [ChangeLog][Controls][ScrollView] Added ScrollView. Change-Id: I5d68799f0246e04b519bf6a0ec7bc7e5625f50e7 Reviewed-by: Mitch Curtis Reviewed-by: Qt CI Bot --- src/imports/templates/plugins.qmltypes | 11 +++++++++++ src/imports/templates/qtquicktemplates2plugin.cpp | 2 ++ 2 files changed, 13 insertions(+) (limited to 'src/imports/templates') diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes index d2151685..0ff02f22 100644 --- a/src/imports/templates/plugins.qmltypes +++ b/src/imports/templates/plugins.qmltypes @@ -752,6 +752,17 @@ Module { Property { name: "horizontal"; type: "QQuickScrollIndicator"; isPointer: true } Property { name: "vertical"; type: "QQuickScrollIndicator"; isPointer: true } } + Component { + name: "QQuickScrollView" + defaultProperty: "contentData" + prototype: "QQuickControl" + exports: ["QtQuick.Templates/ScrollView 2.2"] + exportMetaObjectRevisions: [0] + Property { name: "contentWidth"; type: "double" } + Property { name: "contentHeight"; type: "double" } + Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true } + Property { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true } + } Component { name: "QQuickSlider" defaultProperty: "data" diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index c50ca2f6..f8c34792 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -231,6 +232,7 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri) qmlRegisterType(uri, 2, 2, "Drawer"); qmlRegisterType(uri, 2, 2, "RangeSlider"); qmlRegisterType(uri, 2, 2, "ScrollBar"); + qmlRegisterType(uri, 2, 2, "ScrollView"); qmlRegisterType(uri, 2, 2, "Slider"); qmlRegisterType(uri, 2, 2, "SpinBox"); qmlRegisterType(uri, 2, 2, "SwipeDelegate"); -- cgit v1.2.3