Hello All!

I am trying to declare a signal as the code below shows:
bancodados.h
Qt Code:
  1. #ifndef BANCODADOS_H
  2. #define BANCODADOS_H
  3.  
  4. #include <QObject>
  5.  
  6. class bancoDados : public QObject
  7. {
  8. Q_OBJECT
  9.  
  10. public:
  11. explicit bancoDados(QObject *parent = 0);
  12.  
  13. signals:
  14. void conectar();
  15.  
  16. public slots:
  17.  
  18. };
To copy to clipboard, switch view to plain text mode 
bancodados.cpp
Qt Code:
  1. #include "bancodados.h"
  2.  
  3. #include <QSqlDatabase>
  4.  
  5. bancoDados::bancoDados(QObject *parent) :
  6. QObject(parent)
  7. {
  8.  
  9. }
  10. void bancoDados::conectar()
  11. {
  12. bool retorno = true;
  13.  
  14. emit retorno;
  15. }
To copy to clipboard, switch view to plain text mode 

Well, when I run this code it show the error:
Qt Code:
  1. :-1: error: 1 duplicate symbol for architecture x86_64
To copy to clipboard, switch view to plain text mode 

But, if I change "void conectar();" from signals to public, it runs, but I need to it stays as a signal

Can anyone help me?

Thanks a lot.