QCustomPlot Discussion and Comments

QCPColorMap - How to get cell (x/y) on mouse clickReturn to overview

Hi all,

I'm using QCPColorMap and want to get the coordinates of the data cell I click or double click on.
How can I do this ?


probably just call QCPAxis::pixelToCoord to get the grid coordinates and then you can call QCPColorMapData::data to get the value of that cell.

QCPColorMapData::cellToCoord and coordToCell might also be helpful.

Only to be sure, I have to subclass QCPColorMap to program my own mouseDoubleClickEvent method, right ?
There i could calculate the data cell.

It is probably easier to just use the plottableDoubleClick signal of QCustomPlot. (or mouseDoubleClick signal )

Ah, thinking too complicated... Using mouseDoubleClick is much easier !
Understanding a little more now, the problem is solved with


Thank you very much !