PDA

View Full Version : show only a part of the scene



erfan
29th June 2012, 22:01
hello everyone ;
please help me:confused:
i am working with QGraphicsView framework and i have a scene and a view that (view.setScene(scene));
when i use this method, view show all of the scene
but i want to show particular parts of the scene (for example : one: from x ,from y, to width, to height ;two: from x',from y', to width',
to height' ; and etc...)
is there any way that i can do like this?
so thanks;

amleto
29th June 2012, 23:38
how about you rtfm?

http://qt-project.org/doc/qt-5.0/qgraphicsview.html#sceneRect-prop

erfan
30th June 2012, 06:34
i still don't write this part of the code!
but i try to explain better
please see my image that i attach!
i can move fruits on the all of the scene but i want to write a code that only shows parts of fruits that are in the black box(do you see it ; right of the scene)

i mean that when i move a fruits; when a part of fruit is out of the black box view doesn't show that part of the food!
so thanks