Problem in Qt, Qwt with right-click on QwtPlot and taking X and Y coordinates, signal selected
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)?
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)
精彩评论