QCustomPlot Discussion and Comments

Really inhibiting the axis range dragsReturn to overview


I am a happy user of QCustomPlot since a number of years. Up to now I was happy with the default behaviour of the plot widget as to how it reacted to mouse dragging operations over the axes : the plot would "move" according to the mouse drag. I would like now to avoid having that automatic handling of the axes ranges. No matter how I try and my last code is this:

setInteractions(QCP::iSelectPlottables | QCP::iMultiSelect);
setInteraction(QCP::iRangeDrag, false);

I cannot make the plot widget insensitive to mouse dragging over the axes.

How should I perform the configuration of the plot widget such that I handle these dragging operations by myself without it handling these automatically ?

Thank you for this awesome widget !

The way you do it is correct. (even both individually).

I suspect somewhere else in your code you're turning it back on again, or you're calling these methods on the wrong plot widget if you have multiple...
You could test that by configuring a debug output or a breakpoint in the setInteractions code.

I came back to here because I thought I'd write what you wrote ! Right, I discovered that deep in some code I was changing that interaction mode.
Thank you for your reply that would have set me in the right direction if I had not found that in the first place!