Hello everybody. I'm just testing how to emit a custom signal . For example, i have a button and , when I press it, ai want a signal called MySignal to be emited. I've done that quite easy

Qt Code:
  1. emit MySignal();
To copy to clipboard, switch view to plain text mode 

I now declare this signal in the "h" file :

Qt Code:
  1. signals:
  2. void MySignal();
To copy to clipboard, switch view to plain text mode 

The problem is in the "cpp" file where i define this signal:

Qt Code:
  1. void App1::MySignal()
  2. {
  3. }
To copy to clipboard, switch view to plain text mode 

When it compiles it gives the following error:

Qt Code:
  1. tmp/obj/release_shared/moc_app.o(.text+0x60):moc_app.cpp: multiple de
  2. `App1::MySignal()'
  3. tmp/obj/release_shared/app.o(.text+0x0):app.cpp: first defined here
To copy to clipboard, switch view to plain text mode 

What seems to be the problem ?