I have a QCustomPlot with all the 4 axes enabled and with these interactions activated:
my_w.plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectAxes | QCP::iSelectLegend | QCP::iSelectPlottables);
Now by swiping on an xAxis
or yAxis
I can change the scale, but when I do the same over xAxis2
or yAxis2
nothing happens.
how do I set interaction over the secondary axes?
EDIT:
I've discovered setRangeDragAxes
and setRangeZoomAxes
:
my_w.plot->axisRect()->setRangeDragAxes(my_w.plot->xAxis2,my_w.plot->yAxis2);
my_w.plot->axisRect()->setRangeZoomAxes(my_w.plot->xAxis2,my_w.plot->yAxis2);
now I can drag/and zoom axes, and everything it's almost ok: drag works ok, but When I zoom by swiping with two fingers, both xAxis2
and yAxis2
zoom together.