As a pure test, I created a bogus slot in Canvas (::asd()).
I then did the following:
Qt Code:
  1. class Canvas : public QSFMLCanvas
  2. {
  3. Q_OBJECT
  4. Q_PROPERTY(std::vector<Fault> faults READ GetFaults WRITE SetFaults NOTIFY FaultsEdited)
  5. Q_PROPERTY(std::vector<Horizon> horizons READ GetHorizons NOTIFY HorizonsEdited)
  6. std::vector<Fault> faults; //contains all faults in project
  7. std::vector<Horizon> horizons; //contains all horizons in project
  8. public:
  9. Canvas(const QPoint& Position, const QSize& Size, QWidget* Parent=0);
  10. Canvas();
  11. std::vector<Fault> GetFaults() const;
  12. void SetFaults(std::vector<Fault> v);
  13. std::vector<Horizon> GetHorizons() const;
  14. public slots:
  15. void asd();
  16. signals:
  17. void FaultsEdited();
  18. void HorizonsEdited();
  19. };
  20.  
  21. Canvas::Canvas()
  22. {
  23. //...
  24. connect(this,SIGNAL(FaultsEdited()),this,SLOT(asd()));
  25. std::vector<Fault> v;
  26. v.push_back(Fault());
  27. SetFaults(v);
  28. //...
  29. }
  30. void Canvas::SetFaults(std::vector<Fault> v)
  31. {
  32. faults=v;
  33. }
  34. void Canvas::asd()
  35. {
  36. int u=1;
  37. }
To copy to clipboard, switch view to plain text mode 

I run this in Debug Mode with a breakpoint inside asd() so that, should the signal be emitted and received, the program simply stops at the breakpoint. This is a quick and easy method I use often.

But this time, nothing happens, telling me the signal wasn't emitted. Again, I don't have to emit the NOTIFY signal myself, do I? The macro should do that for me, right?