Hi all,

I would like to get my Qslider position value and store in a txt file. i did as following, my i could not obtain any value.

Qt Code:
  1. int h_slide1 = ui->hueSlide1->value();
  2. QFile valueHSV("/home/pi/valueHSV/hsv.txt")
  3. if(!valueHSV.open(QIODevice::WriteOnly| QIODevice::Text))
  4. return;
  5. QTextStream hsv(&valueHSV);
  6. hsv << h_slide1;
To copy to clipboard, switch view to plain text mode 

is this code correct?