PDA

View Full Version : QWT 6 : QwtPlotMarker : Dynamically adjust the alignment



Kangs
10th May 2011, 17:23
When a point on a curve selected is too close to the edge above or below, the marker is no longer visible.
How to detect this situation to change the alignment of AlignBottom to AlignTop and vice versa ?

Uwe
10th May 2011, 21:10
Derive from QwtPlotMarker and reimplement YourPlotMarker::scaleDivChanged. You probably might also have to implement an event filter for the plot canvas, where you handle resize events.

Uwe

Kangs
11th May 2011, 07:23
Derive from QwtPlotMarker and reimplement YourPlotMarker::scaleDivChanged. You probably might also have to implement an event filter for the plot canvas, where you handle resize events.

Uwe
There are no member 'scaleDivChanged' ?

Uwe
11th May 2011, 18:57
Indeed, it's QwtPlotItem::updateScaleDiv.

Uwe