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

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -