error: 'connect' was not declared in this scope

this is the error I get when trying to compile this code:



Qt Code:
  1. ------ cpp file --------
  2.  
  3. #include "Fraga.h"
  4. #include <QtGui>
  5. #include <QtCore>
  6. Fraga::Fraga()
  7. {
  8. _nyttsvar = new QAction("new answer",0);
  9. qDebug()<<"hej"<<connect(_nyttsvar,SIGNAL(triggered()),this,SLOT(addNewSvar()));
  10. }
  11. ----------- h file-----------
  12. #ifndef FRAGA_H
  13. #define FRAGA_H
  14. #include <QtCore>
  15. #include <QtGui>
  16.  
  17. class Fraga:public QGraphicsRectItem{
  18. Q_OBJECT
  19. public:
  20. Fraga();
  21. public slots:
  22. void addNewSvar();
  23. protected:
  24. QAction* _nyttsvar;
  25. };
  26.  
  27.  
  28. #endif
To copy to clipboard, switch view to plain text mode 

I do not understand what's wrong.