I am planning to overlay some boxes (rects) on top of my spectrogram but i am not sure how to go about this.

background:

these boxes can be up to millions ,information is from a database so i am expecting lots.

I dont think all of them will be shown in one time, its just too much information to handle for the user - say if valid x is from 0 to 1000000 , i will only give my user maximum of 200 units x at a time , and they can scroll left and right to navigate from 0 - 1000000. but still i should be prepared to handle more than 100 boxes.

My plans:

a) I would sublass QwtPlotItem which will represent a single rect.plot will have lots of items to draw i am not sure if this is efficient;
b) I would give a plotCurve a Rect Data (4 points) which represent a rect. This is worse than option a i think.

your thoughts? your opinion is highly appreciated

baray98