title: how to use QSlider in for a variable
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/14120165/using-qslider-to-change-the-value-of-a-variable">Using QSlider to change the value of a variable</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to use the QSlider to to change a variable value: 
  here is a part of the code :</p>
  
  <pre><code> ....
  QSlider *slider = new QSlider(Qt::Horizontal,0);
  connect(slider,SIGNAL(valueChanged()),this,SLOT(value(int k)));
  ...
  </code></pre>
  
  <p>the function value is a SLOT that I want to use let's say  like this:</p>
  
  <pre><code> void value (int k ) {
  cout&lt;&lt; k &lt;&lt; endl;
  }
  </code></pre>
  
  <p>the problem that I have is that nothing happens when I move the slider. ? </p>
  
  <p>thanks in advance </p>