[Kde-bindings] Qyoto: SIGNALS/SLOTS

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Dec 13 20:53:24 UTC 2005

On Tuesday 13 December 2005 15:51, Arno Rehn wrote:
> > We can trap signal calls by overriding the QObject::qt_invoke() method.
> > ...
> Where do you get the QObject::qt_invoke() from? I looked in the Qt-docs and
> in every header-file used by QObject.h . I can't find anything like this.
> The only objects with a qt_invoke() are the Active Qt things.
It's in qobjectdefs.h:

#define Q_OBJECT							\
public:									\
    virtual QMetaObject *metaObject() const { 				\
         return staticMetaObject();					\
    }									\
    virtual const char *className() const;				\
    virtual void* qt_cast( const char* ); 				\
    virtual bool qt_invoke( int, QUObject* ); 				\
    virtual bool qt_emit( int, QUObject* ); 				\
    static QMetaObject* staticMetaObject();				\
    QObject* qObject() { return (QObject*)this; } 			\
    QT_TR_FUNCTIONS							\
private:								\
    static QMetaObject *metaObj;

We need to do weird things with the undocumented QUObject class too, but 
that's all there in QtRuby. Qt4 is easier and more like the way Smoke works, 
and the code in the Qt4 QtRuby using qt_metacall() can be copied too.

-- Richard

More information about the Kde-bindings mailing list