title: Creating a image slideshow (media player style) using QT UI/c++
body: <p>I'm new to C++ and QT creator. I've been looking through certain tutorials and understand certain concepts, however, I'm having a hard time applying them or even knowing where to begin. Right now, I'm trying to develop <strong>a slideshow-like UI in QT, so basically, it looks into a series of images and loops through them like a video.</strong> Ideally <strong>having a PLAY and a STOP button</strong>(I've read about possibly using QTimer) so far I've only been able to implement when I press one button, the image will appear and when I press the second button, the image will clear. Any direction is appreciated. </p>
  
  <p>in mainwindow.cpp </p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  #include &lt;iostream&gt;
  using namespace std;
  
  MainWindow::MainWindow(QWidget *parent) :
       QMainWindow(parent),
       ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      pixmap = QPixmap("/Users/Maggie/Desktop/test/char.png");
  
      connect(ui-&gt;SetImagePushButton1, SIGNAL(clicked()),    this,SLOT(on_SetImagePushButton1_clicked()));
      connect(ui-&gt;SetImagePushButton2, SIGNAL(clicked()), this,SLOT(on_SetImagePushButton2_clicked()));
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  
  
  void MainWindow::on_SetImagePushButton1_clicked()
  {
  
      ui-&gt;pictureBox-&gt;setPixmap(pixmap);
  
  }
  
  void MainWindow::on_SetImagePushButton2_clicked()
  {
      ui-&gt;pictureBox-&gt;setPixmap(QPixmap());
  }
  </code></pre>
  
  <p>in mainwindow.h</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  
  namespace Ui {
  class MainWindow;
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  private slots:
      void on_SetImagePushButton1_clicked();
  
      void on_SetImagePushButton2_clicked();
  
  private:
      Ui::MainWindow *ui;
      QPixmap pixmap;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>