View Full Version : QWT and large amounts of data

17th October 2007, 03:49
I'm using Qwt for my analysis, and it works fine on small data samples. When it comes to large blocks of data however, it simply crashes (rather than just take a lot of memory). I have a big chunk of audio data (several minutes worth) that I am trying to plot as a waveform. I could pre-process the data, but that would ruin Qwt's nice built-in zooming capabilities. Is this just a serious short-coming of Qwt, or am I missing an important feature?

17th October 2007, 05:28
1) Guess you are copying your data into some sort of X/Y point array. Better implement a bridge to your data by deriving from QwtData without copying anything. The simple example might help to understand how to use QwtData.

2) With QwtPlotCurve::PaintFiltered the curve tries to reduce the number of paint operations by removing duplicates ( what should be many if you don't zoom in ).

3) You could implement some "level of detail" filtering by overloading QwtPlotCurve::scaleDivChanged. Here you can adjust the samples you want to keep in memory according to the current axes ranges.

Start the debugger and look at the stack, where your application crashes. In most cases it's a problem of the application, but a good candidate is always the raster paint engine of Qt ( QImage or QWidget on Windows). If it is the raster paint engine try to upgrade Qt.