PDA

View Full Version : Overlaying on qwt: spectrogram



marc2050
1st August 2011, 00:19
Hi.

I'm referring to the spectrogram example given in QWT.
I'm trying to create some custom shapes (e.g. circle and star outline) overlaying on top of the spectrogram. Normally, in QT, we will pass the QPainter with a QPen to draw in the canvas. But in QWT, how do we do it? Particularly in this spectrogram.

Many thanks!

Uwe
1st August 2011, 08:25
Maybe spend at least five minutes on trying to understand the design of the QwtPlot framework - then you will be able to answer yourself,

Uwe

marc2050
1st August 2011, 09:21
Where would be the right place to know more about the design of the QwtPlot framework?
Is there any particular example I could follow?

Uwe
1st August 2011, 09:37
A plot widget is populated with plot items, that are painted in z order. A plot item is something that paints to the plot canvas. This is very similar to the graphics view framework.

After checking the API of the base class of all plot items ( QwtPlotItem ) and what plot items are available you should have an idea how to proceed.

Uwe