Results 1 to 2 of 2

Thread: QWT and large amounts of data

  1. #1
    Join Date
    Sep 2007
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default QWT and large amounts of data

    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?
    Ko9

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWT and large amounts of data

    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.

    HTH,
    Uwe

    Uwe

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.