title: Set value from SpinBox to variable
body: <p>I need to set the <code>spinBox</code> value to my variable, which is outside the function. 
  So here I have variable time and wanna set it to <code>spinBox</code> value:</p>
  
  <pre><code>void MainWindow::on_spinBox_valueChanged(int arg1)
  {
      arg1 = ui-&gt;spinBox-&gt;value();
  }
  </code></pre>
  
  <p>I wanna store <code>arg1</code> to time variable.</p>
  
  <p>Shall I define time as global variable?</p>