OK so I started to make a calculator program and was compiling while I was coding (that's why the code isn't complete), and it gave me these errors.
Qt Code:
  1. error: invalid conversion from `int' to `const QObject*'
  2. error: initializing argument 3 of `static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)'
To copy to clipboard, switch view to plain text mode 

Here is my code.
Qt Code:
  1. #include <QApplication>
  2. #include <QPushButton>
  3. #include <QLabel>
  4. #include <QSpinBox>
  5. #include <QLCDNumber>
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. QApplication app(argc, argv);
  10. QLabel *minus = new QLabel("-");
  11. QPushButton *equal = new QPushButton("Execute");
  12. QSpinBox *num1 = new QSpinBox;
  13. QSpinBox *num2 = new QSpinBox;
  14. QLCDNumber *show = new QLCDNumber(3);
  15. int calc1, calc2;
  16.  
  17. QObject::connect(num1, SIGNAL(valueChanged(int)), calc1, SLOT(setValue(int)));
  18.  
  19. return app.exec();
  20. }
To copy to clipboard, switch view to plain text mode