aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/templates
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-11-16 16:06:07 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-02 16:16:31 +0000
commitb185fc1ac02d4887d2b187a4043b1fdedb95305e (patch)
tree9650c29786a86d7272541702d59cfa285216f7f0 /src/imports/templates
parent5823d6230f5b1fbbd27c3b00b334e062a21b3d65 (diff)
Add Menu
An item-based menu derived from QQuickPanel. Eventually we'd like to make Panel itself a QQuickItem, as it makes both the implementation and the actual usage of Menu a lot easier. Change-Id: Ic1bf2a05ab98d9e17824c402ed8326ef65d26c69 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/templates')
-rw-r--r--src/imports/templates/qtlabstemplatesplugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/templates/qtlabstemplatesplugin.cpp b/src/imports/templates/qtlabstemplatesplugin.cpp
index 6db254b9..721e4cab 100644
--- a/src/imports/templates/qtlabstemplatesplugin.cpp
+++ b/src/imports/templates/qtlabstemplatesplugin.cpp
@@ -49,6 +49,8 @@
#include <QtLabsTemplates/private/qquickgroupbox_p.h>
#include <QtLabsTemplates/private/qquickitemdelegate_p.h>
#include <QtLabsTemplates/private/qquicklabel_p.h>
+#include <QtLabsTemplates/private/qquickmenu_p.h>
+#include <QtLabsTemplates/private/qquickmenuitem_p.h>
#include <QtLabsTemplates/private/qquickpageindicator_p.h>
#include <QtLabsTemplates/private/qquickpanel_p.h>
#include <QtLabsTemplates/private/qquickprogressbar_p.h>
@@ -96,6 +98,8 @@ void QtLabsTemplatesPlugin::registerTypes(const char *uri)
qmlRegisterType<QQuickGroupBox>(uri, 1, 0, "GroupBox");
qmlRegisterType<QQuickItemDelegate>(uri, 1, 0, "ItemDelegate");
qmlRegisterType<QQuickLabel>(uri, 1, 0, "Label");
+ qmlRegisterType<QQuickMenu>(uri, 1, 0, "Menu");
+ qmlRegisterType<QQuickMenuItem>(uri, 1, 0, "MenuItem");
qmlRegisterType<QQuickPageIndicator>(uri, 1, 0, "PageIndicator");
qmlRegisterType<QQuickPanel>(uri, 1, 0, "Panel");
qmlRegisterType<QQuickProgressBar>(uri, 1, 0, "ProgressBar");