vendredi 25 août 2023

setRangeDrag/setRangeZoom how to make limit

Is there a way to limit setRangeDrag/setRangeZoom limit? For example, let's say I have valid data for X [0,100] and Y [0,1000]. If I enable drag on X axis, the plot can go below 0 and above 100 in the X axis and similarly in the Y axis. I can keep dragging on and on without limitation. Same thing for zoom, I'd like the initial view to be the minimum zoom, and the user can only zoom in and then zoom out to the initial view.

I try to use QWheelEvent.

Aucun commentaire:

Enregistrer un commentaire