Hello!
I just started learning qt and I have some questions. I've write a simple program but something is wrong. When the button is clicked() it should write a value on the LCD Screen but there is only a warning: ''Object::connect: No such slot QLCDNumber::display(5)'' ,but I've read that there is a slot like 'display(int num)'

Qt Code:
  1. #include <QApplication>
  2. #include <QFont>
  3. #include <QPushButton>
  4. #include <QWidget>
  5. #include <QLCDNumber>
  6.  
  7. class MyWidget : public QWidget
  8. {
  9. public:
  10. MyWidget(QWidget *parent = 0);
  11. };
  12.  
  13. MyWidget::MyWidget(QWidget *parent)
  14. : QWidget(parent)
  15. {
  16.  
  17. setFixedSize(200,120);
  18.  
  19. QPushButton *quit = new QPushButton(tr("Click"),this);
  20. QLCDNumber *lcd = new QLCDNumber(2,this);
  21. quit -> setGeometry(62,40,75,30);
  22. quit -> setFont(QFont("Times", 18, QFont::Black, true));
  23. connect(quit,SIGNAL(clicked()),lcd,SLOT(display(5)));
  24.  
  25. }
  26.  
  27. int main(int argc, char *argv[])
  28. {
  29. QApplication app(argc,argv);
  30.  
  31. MyWidget widget;
  32. widget.show();
  33.  
  34. return app.exec();
  35. }
To copy to clipboard, switch view to plain text mode 

Thanks, for the answers.