开发者

Problem in Qt, Qwt with right-click on QwtPlot and taking X and Y coordinates, signal selected

开发者 https://www.devze.com 2023-03-19 02:22 出处:网络
Good day! There are QwtPlot and QwtCurve, in short, blue graph, which was built using the library Qwt.

Good day! There are QwtPlot and QwtCurve, in short, blue graph, which was built using the library Qwt. Question: how to make sure that when you right-click on QwtPlot, pictured red vertical line (as in the figure, the coordinate X is taken from the cursor position)?

Problem in Qt, Qwt with right-click on QwtPlot and taking X and Y coordinates, signal selected

I can draw a line, but I can not determine which signal to connect to a slot draw. I tried to signal void QwtPlotPicker:: selected (const QPointF & pos) bind to a slot dr开发者_运维知识库aw, but the problem is that when Clicking the signal does not work (tested step by step in debugging). In what may be the problem?

P.S. Thanks in advance!


Is your QwtPlotPicker initialized with the canvas of the plot? And what are your selectionFlags set to for the QwtPlotPicker? (You should be using QwtPicker::ClickSelection)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号