summaryrefslogtreecommitdiffstats
path: root/examples/declarative/cppextensions/plugins/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/cppextensions/plugins/plugin.cpp')
-rw-r--r--examples/declarative/cppextensions/plugins/plugin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/declarative/cppextensions/plugins/plugin.cpp b/examples/declarative/cppextensions/plugins/plugin.cpp
index 355ca3f..01d5361 100644
--- a/examples/declarative/cppextensions/plugins/plugin.cpp
+++ b/examples/declarative/cppextensions/plugins/plugin.cpp
@@ -96,11 +96,13 @@ private:
QBasicTimer timer;
};
+//![0]
class TimeModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int hour READ hour NOTIFY timeChanged)
Q_PROPERTY(int minute READ minute NOTIFY timeChanged)
+//![0]
public:
TimeModel(QObject *parent=0) : QObject(parent)
@@ -135,6 +137,7 @@ private:
int TimeModel::instances=0;
MinuteTimer *TimeModel::timer=0;
+//![plugin]
class QExampleQmlPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
@@ -145,7 +148,10 @@ public:
qmlRegisterType<TimeModel>(uri, 1, 0, "Time");
}
};
+//![plugin]
#include "plugin.moc"
+//![export]
Q_EXPORT_PLUGIN2(qmlqtimeexampleplugin, QExampleQmlPlugin);
+//![export]