hack006
31st March 2011, 18:28
Hi, I am trying to set up logarithmic scale for a Knob, but the following code isn't working. Knob's scale keeps the same values - nothing changes after execution of this code. I would like to have these values: 0.01, 0.02, 0.05, 0,1 0,2 .. 1
void JOP::scopeGetInicialized(){
double min, max, step;
min = 1.0;
max = 4.0;
step = 1.0;
QwtLog10ScaleEngine * log10SE = new QwtLog10ScaleEngine();
log10SE->divideScale(0.001,0.2,6,2,1);
ui->KnobTimeA->setScaleEngine(log10SE);
ui->KnobTimeA->repaint();
qDebug() << "Scale changed";
}
Thank's for help
void JOP::scopeGetInicialized(){
double min, max, step;
min = 1.0;
max = 4.0;
step = 1.0;
QwtLog10ScaleEngine * log10SE = new QwtLog10ScaleEngine();
log10SE->divideScale(0.001,0.2,6,2,1);
ui->KnobTimeA->setScaleEngine(log10SE);
ui->KnobTimeA->repaint();
qDebug() << "Scale changed";
}
Thank's for help