aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/qtquickcontrolsplugin.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-03-29 18:26:16 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-04-11 15:53:10 +0000
commit1acb34a40ea0fbc0c0730cdc81dcfd46bdeb4ef7 (patch)
treef36c5c2d70667a8ae34adf821f309266f1fd97b4 /src/imports/controls/qtquickcontrolsplugin.cpp
parentca05a729acaf06aabfbbbc681cfa650785659005 (diff)
Add CheckDelegate
CheckDelegate is an item delegate that is used in lists, and can be checked and unchecked. It derives from QQuickItemDelegate and hence has background press effects. The order of the indicator and text is reversed (compared to CheckBox) to reflect what is most commonly seen on mobile. Change-Id: I6fdac226fe87247052389b2e49f6cf20d7be44fb Task-number: QTBUG-52208 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/qtquickcontrolsplugin.cpp')
-rw-r--r--src/imports/controls/qtquickcontrolsplugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/controls/qtquickcontrolsplugin.cpp b/src/imports/controls/qtquickcontrolsplugin.cpp
index 076ba57b..7f0e20e0 100644
--- a/src/imports/controls/qtquickcontrolsplugin.cpp
+++ b/src/imports/controls/qtquickcontrolsplugin.cpp
@@ -97,6 +97,7 @@ void QtQuickControlsPlugin::registerTypes(const char *uri)
qmlRegisterType(selector.select(QStringLiteral("BusyIndicator.qml")), uri, 1, 0, "BusyIndicator");
qmlRegisterType(selector.select(QStringLiteral("Button.qml")), uri, 1, 0, "Button");
qmlRegisterType(selector.select(QStringLiteral("CheckBox.qml")), uri, 1, 0, "CheckBox");
+ qmlRegisterType(selector.select(QStringLiteral("CheckDelegate.qml")), uri, 1, 0, "CheckDelegate");
qmlRegisterType(selector.select(QStringLiteral("ComboBox.qml")), uri, 1, 0, "ComboBox");
qmlRegisterType(selector.select(QStringLiteral("Dial.qml")), uri, 1, 0, "Dial");
qmlRegisterType(selector.select(QStringLiteral("Drawer.qml")), uri, 1, 0, "Drawer");
@@ -141,6 +142,9 @@ void QtQuickControlsPlugin::initializeEngine(QQmlEngine *engine, const char *uri
qmlRegisterType<QQuickBusyIndicatorAnimator>(import, 1, 0, "BusyRingAnimator");
qmlRegisterType<QQuickProgressStrip>(import, 1, 0, "ProgressStrip");
qmlRegisterType<QQuickProgressAnimator>(import, 1, 0, "ProgressStripAnimator");
+
+ const QString pluginBasePath = QQuickPluginUtils::pluginBasePath(*this);
+ qmlRegisterType(pluginBasePath + QStringLiteral("/CheckIndicator.qml"), import, 1, 0, "CheckIndicator");
}
QT_END_NAMESPACE