foo.cpp 308 B

1234567891011121314151617181920212223242526
  1. #include "foo.h"
  2. #include <stdio.h>
  3. class FooFoo : public QObject
  4. {
  5. Q_OBJECT
  6. public:
  7. FooFoo():QObject() {}
  8. public slots:
  9. int getValue() const { return 12; }
  10. };
  11. Foo::Foo()
  12. :QObject()
  13. {
  14. }
  15. void Foo::doFoo()
  16. {
  17. FooFoo ff;
  18. printf("Hello automoc: %d\n", ff.getValue());
  19. }
  20. #include "foo.moc"