msmihai
3rd January 2009, 14:18
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
emit MySignal();
I now declare this signal in the "h" file :
signals:
void MySignal();
The problem is in the "cpp" file where i define this signal:
void App1::MySignal()
{
}
When it compiles it gives the following error:
tmp/obj/release_shared/moc_app.o(.text+0x60):moc_app.cpp: multiple de
`App1::MySignal()'
tmp/obj/release_shared/app.o(.text+0x0):app.cpp: first defined here
What seems to be the problem ?
emit MySignal();
I now declare this signal in the "h" file :
signals:
void MySignal();
The problem is in the "cpp" file where i define this signal:
void App1::MySignal()
{
}
When it compiles it gives the following error:
tmp/obj/release_shared/moc_app.o(.text+0x60):moc_app.cpp: multiple de
`App1::MySignal()'
tmp/obj/release_shared/app.o(.text+0x0):app.cpp: first defined here
What seems to be the problem ?