Files
qt-creator/share/qtcreator/templates/wizards/qml-extension/plugin.cpp
Christian Kamm 5ce24ce06a Qml plugin wizard: Add uri annotation.
Change-Id: Ie207fe674ac92b5cbcace054f452dec5300e1222
Reviewed-on: http://codereview.qt-project.org/5833
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-10-04 10:32:29 +02:00

13 lines
339 B
C++

#include "%ProjectName:l%_plugin.%CppHeaderSuffix%"
#include "%ObjectName:l%.%CppHeaderSuffix%"
#include <QtDeclarative/qdeclarative.h>
void %ProjectName:s%Plugin::registerTypes(const char *uri)
{
// @uri %Uri%
qmlRegisterType<%ObjectName%>(uri, 1, 0, "%ObjectName%");
}
Q_EXPORT_PLUGIN2(%ProjectName:s%, %ProjectName:s%Plugin)