I've created a vector v with 128 elements from -3000 to 3000 and I want to associate it to a QDoubleSpinBox
and a QSlider
, because dividing 6000 to 128 and setting the QDoubleSpinBox
we have always the round problem. So can we set the range and the stepsize both to a QDoubleSpinBox
and QSlider
with a vector like this?
std::vector<double> v(128);
for (int i = 0; i < 128; ++i)
{
v[i] = -3000.0 + 6000.0 * (i) / 127.0;
}