I have created a programme with following files
calculator.cpp
Qt Code:
  1. #include "calculator.h"
  2. #include "ui_calculator.h"
  3. calculator::calculator(QWidget *parent)
  4. : QWidget(parent)
  5. {
  6. //Ui::calculatorClass *cal = new Ui::calculatorClass;
  7. //ui.setupUi(cal);
  8. ui.setupUi(this);
  9. connect (ui.spinBox1, SIGNAL(valueChanged(int)), this, SLOT(setValueLineEditSpinBox1(int & value)));
  10. /* connect (ui.spinBox2, SIGNAL(valueChanged(int)), calculator, SLOT(setValueLineEditSpinBox2(int & value))); */
  11. ui.lineEdit->setText("5");
  12. }
  13.  
  14. calculator::~calculator()
  15. {
  16.  
  17. }
  18. //slots
  19. void calculator::setValueLineEditSpinBox1(int &value)
  20. {
  21. ui.lineEdit->setText(QString::number(value+ui.spinBox2->value()));
  22. }
  23.  
  24.  
  25. void calculator::setValueLineEditSpinBox2(int &value)
  26. {
  27. ui.lineEdit->setText(QString::number(value+ui.spinBox1->value()));
  28. }
To copy to clipboard, switch view to plain text mode 

calculator. h file
Qt Code:
  1. #ifndef CALCULATOR_H
  2. #define CALCULATOR_H
  3.  
  4. #include <QtGui/QWidget>
  5. #include "ui_calculator.h"
  6.  
  7. class calculator : public QWidget
  8. {
  9. Q_OBJECT
  10.  
  11. public:
  12. calculator(QWidget *parent = 0);
  13. ~calculator();
  14.  
  15. signals:
  16. /* int valuespinBox1();
  17.   int valuespinBox2();
  18. */
  19. public slots:
  20. void setValueLineEditSpinBox1(int &value);
  21. void setValueLineEditSpinBox2(int &value);
  22.  
  23.  
  24.  
  25. private:
  26. Ui::calculatorClass ui;
  27. };
  28.  
  29. #endif // CALCULATOR_H
To copy to clipboard, switch view to plain text mode 

main.cpp file
Qt Code:
  1. #include "calculator.h"
  2. #include "ui_calculator.h"
  3.  
  4. #include <QtGui>
  5. #include <QApplication>
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. QApplication a(argc, argv);
  10. calculator w;
  11. w.show();
  12. return a.exec();
  13. }
To copy to clipboard, switch view to plain text mode 

I get an error as below
No symbol "auto" in current context.
warning: Object::connect: No such slot calculator::setValueLineEditSpinBox1(int&value)

warning: Object::connect: (sender name: 'spinBox1')

warning: Object::connect: (receiver name: 'calculatorClass'
what is the issue in signal and slot not able to understand

can anybody help please?