title: Generating Qt Q_OBJECT classes pragmatically
body: <p>How might one go about making a Q_OBJECT based class (one that has signals and/or slots) through metaprogramming?  I don't care if it's templates or preprocessor, neither appears to work and I really need it too.</p>
  
  <p>What I want is to be able to bind arbitrary function like things to Qt signals.  Qt signals are incapable of this, boost signals are.  So, I need a Qt object that can connect to a Qt signal and simply forward it on to a boost signal.  I'll need to do this a bunch, so it would be nice to automate.</p>
  
  <p>The main problem appears to be--no big surprise--the moc processor.  It doesn't understand basic preprocessing (except ifs) and apparently can't do template classes either.</p>
  
  <p>Any ideas?</p>