Hi all,
I'm very aware of the existence of Qwt and such, but I am (educationally and more) trying to create my own plotting code in Qt (for now it's an app, easy to debug, later it would be a library much like QtGui and such... that's the idea ).
Currently I'm struggling with QTransform and setSceneRect and resizing stuff...
1) I would like my plot to resize and fit in the window/widget. Currently I have set the sceneRect to a square between 0 and 100 and drawn a grid on it that shows the borders and the 20-40-60-80 lines. When you resize this , the grid assumes the widget's smallest dimension, which is quite logical seeing the resize function I implemented. I would, however, like the grid to fill the whole QGraphicsView/Scene (which is it?) and "stretch" the spacing of the lines accordingly.
2) After step one is complete: I know there is a setCosmetic that keeps width and all constant. Is this usable for my axes and axes labels and legend, so that their position is scaled, but their shape is not?
Thanks a bunch, I've been struggling with this a lot!
PS: I've attached the source code and 64-bit windows debug binary. As of this moment I get a link.exe crash so it could be there's a small typo-ish bug in the code at the moment. Sorry for that.
Bookmarks