PDA

View Full Version : How to draw a coordinate system in a QGraphicsView



Cal
9th April 2009, 15:51
Hey,
I need to write a tool to make a scalable and movable plot of a route, basicly a point to point line. I figured QgraphicsView would be best for that purpose, cause u can easily scale and move the plot.
My problem is: i want to draw a coordinate system into that plot. one x-axis on the bottom and a y-axis on the left. The problem is, i dont know how to draw sth on top of a QGraphicView which doesnt move when i change or scale the view. is there an option do create maybe a transparent widget on top of the graphic view?

im getting really desperate on this.. :(
i hope someone can help me here

greetings
lutz

Cal
9th April 2009, 15:54
ah, well and i tried that "QGraphicsView::drawForeground()" function, but apparently im too stupid to use it.. it doesnt draw anything, and in the descritpion it says it works with scene coordinates, not with the view coordinates.