Ok, I think I must explain where getInvTransform() comes from. As you said QwtPlotPicker has invTransform() method, but it is protected so I can't call it from my other classes, so the method getInvTransform() is a very simple public method calling invTransform() of its basic class 'QwtPlotPicker', so that other classes can use it.
So, now, do you have any idea about why invTransform() returns x-value including the width of y-axis ruler part?
use
Qt Code:
To copy to clipboard, switch view to plain text mode
Hello, I tried but it didnt give correct result. I guess, the value you subtracted is the zero point in pixel coordinates, but I want to get the zero point in plot coordinates..
Don't use a picker here - it's a QObject, that needs event processing - something, that is not happening the way you wrote your code.
Instead do something like this:
Qt Code:
{ ... }To copy to clipboard, switch view to plain text mode
I'm not 100% sure if this already solves your problem, but at least it's better than using a picker and it should be easier to find out what is going on. If the bug is still there you should check p1, p2, s1, s2 of the maps to see if there are pending updates of the scales because of a missing replot.
Uwe
Hello, it didnt help either..but I will try to investigate it deeper..
By the way, isnt it possible to retrieve the width of the vertical ruler on the left part of the widget?
Bookmarks