#include class Foo : public QGraphicsLayout { Q_INTERFACES(QGraphicsLayout) }; #include "qtinterface.moc"