[Qt-interest] aspect-ratio for graphs

Sean Harmer sean.harmer at maps-technology.com
Thu Jul 15 11:26:23 CEST 2010


Hi,

On Thursday 15 July 2010 09:54:28 phil prentice wrote:
> Thanks Constantin
>   QGraphicsScene & QGraphicsView look to me to enable you to managing a
> large number of 2D graphical items. I dont need that.  

QGraphicsScene provides a 2D scenegraph. You could construct your graph such 
that each point is a QGraphicsItem, and each axis is a QGraphicsItem, and the 
grid is  QGraphicsItem and... 

I am in the process of writing a generic 2D plotting library on top of 
QGraphicsView with some nice results (so far) so I can say it is certainly 
feasible and in some ways much nicer than a QWidget approach. 

It's just a different approach. It still ends up with pixels being drawn on 
the screen that look like a graph. It's your choice of course but do not 
immediately rule out the QGraphicsView framework.

> It uses scrollbars which again is not a requirement.  Thanks again for your
> input.

You do not *have* to have scrollbars. It depends upon how you configure 
QGraphicsView and what scene rect your scene has.

Good luck,

Sean



More information about the Qt-interest-old mailing list