diff options
Diffstat (limited to 'src/plugins/cppeditor/cppclasswizard.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppclasswizard.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp index f1a8acee15..0893ed4595 100644 --- a/src/plugins/cppeditor/cppclasswizard.cpp +++ b/src/plugins/cppeditor/cppclasswizard.cpp @@ -70,7 +70,8 @@ ClassNamePage::ClassNamePage(QWidget *parent) : << QLatin1String("QObject") << QLatin1String("QWidget") << QLatin1String("QMainWindow") - << QLatin1String("QDeclarativeItem")); + << QLatin1String("QDeclarativeItem") + << QLatin1String("QQuickItem")); m_newClassWidget->setBaseClassEditable(true); m_newClassWidget->setFormInputVisible(false); m_newClassWidget->setNamespacesEnabled(true); @@ -237,7 +238,7 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par // class in case the user did not specify one. QString parentQObjectClass; bool defineQObjectMacro = false; - switch(params.classType) { + switch (params.classType) { case Utils::NewClassWidget::ClassInheritsQObject: parentQObjectClass = QLatin1String("QObject"); defineQObjectMacro = true; @@ -250,6 +251,10 @@ bool CppClassWizard::generateHeaderAndSource(const CppClassWizardParameters &par parentQObjectClass = QLatin1String("QDeclarativeItem"); defineQObjectMacro = true; break; + case Utils::NewClassWidget::ClassInheritsQQuickItem: + parentQObjectClass = QLatin1String("QQuickItem"); + defineQObjectMacro = true; + break; case Utils::NewClassWidget::NoClassType: case Utils::NewClassWidget::SharedDataClass: break; |