title: How to get integer value from QSpinBox changed value?
body: <p>Here, I am just trying to obtain the changed <code>int</code> value from <code>QSpinBox</code> by using <code>SIGNAL and SLOTS</code> because I need to use this <code>int</code> variable in my another function. I mean if the user changes <code>QSpinBox</code> values, it changes the value of <code>int</code> variable.</p>
  
  <p>I know this <code>SIGNAL</code> will be <code>SIGNAL(valueChanged(int))</code>, but I got confused about what the <code>SLOT</code> will be in this case. I really got stack on this point.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>What I have tried is following. <code>MainWindow.h</code> is</p>
  
  <pre><code>#include &lt;QMainWindow&gt;
  class MainWindow : public QMainWindow
  {
  Q_OBJECT
  
  public slots:
      void setFrame(int frame);
  </code></pre>
  
  <p>MainWindow.cpp is following. To check how it is working I tried to display the <code>int</code> in a <code>QLabel</code>.</p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  
  MainWindow::MainWindow(QWidget *parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      connect(ui-&gt;spinBox, SIGNAL(valueChanged(int)), this, SLOT(setFrame(int frame)));
  }
  void MainWindow::setFrame(int frame)
  {
      ui-&gt;label-&gt;setText(QString::number(frame));
  
  }
  </code></pre>
  
  <p>Can anyone fix this regarding how to get the changed <code>int</code> value from <code>QSpinBox</code>?</p>
  
  <p>Thanks in advance.</p>