Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QChart's mouse events vs QChartView's mouse events
lucbaz last edited by
I implemented a custom chart by deriving from QChart. I am currently working on the mouse events of this class. I added the code so that I can add and remove a point on the graph by double clicking, and it worked fine.
Afterward, I wanted to work on the zooming of the chart. I read a document on the subject: https://doc.qt.io/qt-5/qtcharts-zoomlinechart-example.html. In this example, they implemented a custom QChartView and used its mouse events. I was wondering why use the QChartView's mouse events when it is possible to do it with QChart's mouse events. When should I choose QChartView's mouse events rather than QChart's mouse events?
Thanks in advance.