title: How to change saturation and value using slider qcolor?
body: <p>Can someone help me make two sliders named brightness and saturation for changing both brightness and saturation, I set up a dialog with QLabel for displaying image and two sliders below. I tried converting my image to HSV then change S and V. But that does not work.</p>
  
  <pre><code>void Dialog::sliderchange(QLabel *label,int value){
  QImage image=label-&gt;pixmap()-&gt;toImage();
  for(int i=0;i&lt;image.width();i++){
      for(int j=0;j&lt;image.height();j++){
          QColor color=image.pixelColor(i,j);
          color.convertTo(QColor::Hsv);
          value=color.value();
          color.setHsv(color.hue(),color.saturation(),value);
  
      }
  }
  }
  
  void Dialog::on_brightness_valueChanged(int value){
    sliderchange(ui-&gt;label,value);
  }
  </code></pre>