[PySide] can't wrap subclass of QObject?

Matthew Woehlke matthew.woehlke at kitware.com
Mon Jul 22 22:33:27 CEST 2013

I feel confident I am doing something dumb, but I can't figure out why, 
when trying to wrap any class that subclasses QObject (and/or has a 
Q_OBJECT?), I am getting this error:

foo_wrapper.cpp: error: no ‘const QMetaObject* fooWrapper::metaObject() 
const’ member function declared in class ‘fooWrapper’

Most of the results trying to search the web for similar errors suggest 
an include path issue, however AFAICT I am passing the include 
directories for Qt to shiboken. My command line is (with some unrelated 
includes elided):

  --enable-pyside-extensions /path/to/foo/build/foo/foo_all_sdk_headers.h

...and my (simplified) typesystem XML:

<?xml version="1.0"?>
<typesystem package="fooPython">
   <load-typesystem name="typesystem_core.xml" generate="no"/>
   <object-type name="foo"/>

Any hints?


More information about the PySide mailing list