template class MyThread : public QObject{ Q_OBJECT T foo; MyThread() : foo(0) {} };