Quote Originally Posted by aamer4yu View Post
Well, my requirement for application is as follows -
Read data from a spectrometer and plot its values(wavelength vs intensities) on a QImage / QPixmap.
Isn't the requirement of your application to plot to screen - if not why do you need a QwtPlot widget ?
Isn't QPixmap/QImage only part of your implementation trying to speed up the rendering process ?
...something like scatter diagram in excel.
Rendering your curve points to an image and flushing the image for each point doesn't speed up anything - in fact it is probably the worst (horrible slow) implementation I can imagine.

If your axis scales don't change for each point you could try to paint your points incrementally. This is supported on X11 (best) and on platforms using the raster paint engine ( f.e windows). Have a look at the realtime example and check if this is the performance you expect from your application.

In qwt trunk you find an oscilloscope example, that shows an implementation with a thread producing values and how they are painted incrementelly in the GUI thread.

But If you don't have many points and high refresh rates (several frames per second) I wouldn't spend much time on optimizations and use QwtPlot in its default settings (beside disabling the paint cache) - using replot for each update.

Uwe