Hi all,
I would like to get your feedback on how I should use QGraphicsView for a technical application.
I plan to render graphs that have X and Y axis that both render a range from 0..100. The Y-Axis does this for % and the X-Axis for msec.
I started to render the axis but 'am not 100% sure how to do it right. If you specify e.g. the x-axis to be 400 pixel long, and the y axis 200 pixel high, than that's what you get. Meaning what I really want is that the scene alway's takes up the most available space in the view. This is important if the user resizes the application window. So if I start like this:
#######################
# ^
# |
# |
# +---------------------------------->#
#######################
Now the user changes the size of the view:
############################
# ^
# |
# |
# |
# |
# +------------------------------------------->#
############################
Then I still want the scene to render correctly in all the available space of the view. Zooming doesn't really do the job, because the ratio between available pixel in y direction may differ from the x axis...
Also the scene does require you to specify fixed lengh parameters for e.g. a addLine method. I really wonder if i have to clear all graphics items in the scene when the user changes the size of the view... get the available space from the view and then render the scene again.
How would you use the QGraphicsView / Scene for this? Any suggestion?
Thanks.
Bookmarks