I was following a signal&slot tutorial I found out on youtube on how to create a progressBar and horizontalSlider just by coding, without drag&drop.

This is the code (mainwindow.cpp file):
Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. MainWindow::MainWindow(QWidget *parent) :
  5. QMainWindow(parent),
  6. ui(new Ui::MainWindow)
  7. {
  8. ui->setupUi(this);
  9. connect(ui->horizontalSlider,
  10. SIGNAL(valueChanged(int)),
  11. ui->progressBar,
  12. SLOT(setValue(int)));
  13. }
  14.  
  15. MainWindow::~MainWindow()
  16. {
  17. delete ui;
  18. }
To copy to clipboard, switch view to plain text mode 

As you see, all the job was to add the text in the constructor.
It fails to compile on my laptop: "class Ui::MainWindow has no member named horizontalSlider and class Ui::MainWindow has no member named progressBar".
However on the video I was following it compiles and the author didn't make any additional writings.
I would highly appreciate your suggestions, guys.
I'm using Qt 5.4.1, maybe it's because of version inconsistencies and that tutorial is outdated?