Hello,
I am drawing a curve using QwtPlotCurve in a derived QwtPlot class, and I display some markers and symbols at given locations to show particular points of the curve. I am using rectangle as symbols, and I want these rectangle to have a defined height, starting at the bottom x axis, to represent some value.
So, I calculate the symbol size QSize(nx,ny) with :
int ny = (int)abs(transform(QwtPlot::yLeft,ym) - transform(QwtPlot::yLeft,0));
and this works perfectly well. BUT, when I zoom in the graph, the symbol are not resized accordingly to the new zoomed window and everything is messed up.
Digging a bit on the forum, I have read that I could overload QwtSymbol::drawSymbols to get the job done. However, this is a virtual const function, and qtcreator/gcc does not allow me to modify the symbol size (object data) within the overloaded function. Removing the const qualifier just changes the signature and the overloaded function is not called.
Any help warmly welcomed,
best regards
Oliver
Bookmarks