Search code examples
qtqchartqchartview

How to disable right click action when using QRubberBand?


Whenever I press the right-click button, it sort of zooms out a little instead I want to restore the initial position of my QChart whenever I press the Right-Click. Is there a way to do this?


Solution

  • I think you should set the Rubberband to "no" for the chartView, so that it does react to your positioning, but no zoom.

    setRubberBand(QChartView::NoRubberBand);