Hm, yeah this works in a way.. but it somehow screws my other transfromations, so my idea is to invert the transform matrix of the view and send it over to ellipse and scale ellipse with m11().. but mayby I wont need this at, all. Im stacking the problem for later..
Thanks, D. > On 28. mai. 2008, at 20.40, Dawid Sip wrote: > >> Hi, >> as some might remember, im doing a lot with >> GraphicsView/GraphicsScene/GraphicsItem. So my recent problem is that I >> have EllipseItems in my scene. These ellipses are of width and hight-16. >> The viewport is scaled in the overriden resizeEvent of MyGraphicsView >> with fitInView, so that an Image can be displayed inside the >> MyGraphicsView entirely. This naturaly also makes the EllipseItems >> appear smaller than 16 pixel. I would like them to remain the same size. >> So my idea is to emmit a signal in each call to resizeEvent() of >> MyGraphicsView. This signal could be catched by the EllipseItem and than >> I could poly = mapToParent(this.boundingRect()) and compare the poly to >> some value, and scale this EllipseItem so that the size stays the same . >> Dont realy know how. >> Somehow I think this might be to complicated, is there an easier way? >> > > Hi Dawid, > > The flag you are looking for is: > > http://doc.trolltech.com/qtjambi-4.3.4_01/doc/html/com/trolltech/qt/gui/QGraphicsItem.GraphicsItemFlag.html#ItemIgnoresTransformations > > > > This tells QGraphicsView that the item should be rendered at the > position according to the scene transform, but with a transformation > according to the view. > > best regards, > Gunnar > > >> D. >> _______________________________________________ >> Qt-jambi-interest mailing list >> [email protected] >> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest > > http://doc.trolltech.com/qtjambi-4.3.4_01/doc/html/com/trolltech/qt/gui/QGraphicsItem.GraphicsItemFlag.html#ItemIgnoresTransformations > > > _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
