Your Q_OBJECT placement is fine in your code.
What you are hitting is that you forgot to include the generated moc file in your source such as:
baseclass.cpp (at the end of the file)
#include "baseclass.moc"
subclassone.cpp (at the end of the file)
#include "subclassone.moc"
subclasstwo.cpp (at the end of the file)
#include "subclasstwo.moc"
You need to make sure moc is generating these files for you though. You have not shown your buildsystem yet.
Also, please make sure to have one header and source file per "Q_OBJECT" classes. It is not strictly necessary, but it is a good practice.
You can of course resolve that at link time as well, but you will need to do either of those.
Moreover, once you have multiple inheritance, at least with Qt 4, you will need to inherit from the QObject
subclass first, which is QWidget
in your case. You can find the correct inheritance below.
subclassone.h
class SubClassOne : public QWidget, public BaseClass
subclasstwo.h
class SubClassTwo : public QDialog, public BaseClass
etc. Hope it helps.