PDA

View Full Version : Graphicsview and Graphicsscence



moh.gup@gmail.com
29th May 2012, 18:10
Hi,
I want to draw some item in scene coordinate system and some in view coordinate system.
item in scene coordiante works fine.But item in view coordiante need to adjust every time and transformation not applied uniformly in view.(scene is consider as real world coordinate ,view has widget coodrniate in which some item to be added ,but currently all items added in scence only and all transform applied to view.)
Can u suggest me how to deal with such problem.

wysota
30th May 2012, 09:19
If you want to draw an "item" in view coordinates then I'm assuming the "item" is not part of the scene, thus it is not a real item at all. Subclass QGraphicsView and reimplement its paintEvent() to draw the things you want in widget coordinates.