[Qt-interest] QMetaObject and its method() function
Louis Du Verdier
zemassacreur at yahoo.fr
Sat Jan 16 14:09:04 CET 2010
> They do. It just happens that you have not run into any objects that have
> them. Like you said yourself, moc will not extract and store information about
> all methods. You have to tell it about the methods you want extracted.
> By definition, slots and signals are methods you've told moc to extract
> information on.
> Try this object:
> class Foo: public QObject
> {
> Q_OBJECT
> public:
> Q_INVOKABLE Foo(QObject *parent = 0);
> Q_SLOT void slot();
> Q_SIGNAL void somethingChanged();
> Q_INVOKABLE void method();
> Q_SCRIPTABLE void scriptableMethod();
> void regularMethod();
> public slots:
> void slot2();
> signals:
> void somethingChanged2();
> };
I had tried to use Q_INVOKABLE on the constructor but this one is not inclued in the list which is shown in the table. But the method() function in the public section of the class works, so it is not a Q_INVOKABLE problem.
The rest works to. Maybe I have missed something ?
Thanks,
Louis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100116/85ddb60e/attachment.html
More information about the Qt-interest-old
mailing list