c++ - QGraphicsView and QGraphicsScene -
I have a doubt with QGraphicsView. If I put the scenarios with coordinates: (0, 02,200,200), the view decreases with the top E 9px from the left side of 9px, such as in the image:
QGraphicsScene * myScene = new QGraphicsScene (); Custom animation * ca = new custom animation (); // QGraphicsWidget comes from myScene->; AddItem (ca); MyScene-> SetSceneRect (0,0,200,200); UI- & gt; Gfx_animation- & gt; SetScene (myScene); UI- & gt; Gfx_animation- & gt; SetHorizontalScrollBarPolicy (QT :: ScrollBarAlwaysOff); UI- & gt; Gfx_animation- & gt; SetVerticalScrollBarPolicy (QT :: ScrollBarAlwaysOff);
But if I use setSceneRect (9, 92,200,200), the view is positioned properly. Is something wrong?
Comments
Post a Comment