foo.cpp 461 B

123456789101112131415161718192021222324252627282930
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "foo.h"
  4. #include <stdio.h>
  5. class FooFoo : public QObject
  6. {
  7. Q_OBJECT
  8. public:
  9. FooFoo()
  10. : QObject()
  11. {
  12. }
  13. public slots:
  14. int getValue() const { return 12; }
  15. };
  16. Foo::Foo()
  17. : QObject()
  18. {
  19. }
  20. void Foo::doFoo()
  21. {
  22. FooFoo ff;
  23. printf("Hello automoc: %d\n", ff.getValue());
  24. }
  25. #include "foo.moc"