Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "plugin_test_plugin.h"
- #include<QDebug>
- A::A(QDeclarativeItem *parent)
- : QDeclarativeItem(parent){}
- void A::printThis()
- {
- qDebug()<< "A: "<<(int)this;
- }
- B::B(QDeclarativeItem *parent)
- : QDeclarativeItem(parent){}
- void B::printThis()
- {
- qDebug()<< "B: "<<(int)this;
- }
- void B::printA(A* p_a)
- {
- qDebug()<< "A: "<<(int)p_a;
- }
- void plugin_testPlugin::registerTypes(const char *uri)
- {
- qmlRegisterType<A>(uri, 1, 0, "A");
- qmlRegisterType<B>(uri, 1, 0, "B");
- }
- Q_EXPORT_PLUGIN2(plugin_test, plugin_testPlugin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement