Jord,
So what should one do to address or circumvent the behaviour? In my case, the call works only in Mac OS and not in Linux, the second call to either change the scale between Linear and Log, or change the Min and Max values is called as show here:
calibPlot
->setAxisScale
(QwtPlot::xBottom, xMinVal.
toInt(&ok,
10),axisXEnd
->text
().
toInt(&ok,
10) );
calibPlot->setAxisScale(QwtPlot::xBottom, xMinVal.toInt(&ok,10),axisXEnd->text().toInt(&ok,10) );
To copy to clipboard, switch view to plain text mode
When called to change the Scale:
void CentralPage
::xAxisScaleChange( const QString &xAxisScaleType
) {
if (xAxisScaleType == "[X]Linear") {
calibPlot->replot();
} else {
calibPlot->replot();
}
}
void CentralPage::xAxisScaleChange( const QString &xAxisScaleType)
{
if (xAxisScaleType == "[X]Linear") {
calibPlot->setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine ());
calibPlot->replot();
} else {
calibPlot->setAxisScaleEngine(QwtPlot::xBottom, new QwtLog10ScaleEngine());
calibPlot->replot();
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks