I looked through the related questions and couldn't find anything that addresses exactly what I was talking about, so let me describe.
I have a class, let's say foo that needs to have its own slots and signals, but also needs to inherit from QXmlDefaultHandler (sounds rather odd, but I encountered this situation when trying to use QHttp to read a website directly into a QBuffer).
class foo: public QXmlDefaultHandler, public QObject
{
public:
foo();
~foo();
Q_OBJECT
public slots:
void bar();
}
This code, if accompanied by a cpp to connect bar to a signal somewhere else, will not compile. You'll get errors about some members of QObject not being a member of QXmlDefaultHandler. Additionally, you can't move Q_OBJECT or else you get vtable errors for not implementing some things (go on! try it!).
please see my answer for the (very simple) fix. I will entertain voting you as the accepted answer if I think you explain it better than I do.
edit: for you c++ and Qt vets, please post an answer if you can explain it better. i spent quite a bit of time looking this info up, so please help someone else if you can do better than me.