Please nominate your Qt Champions for 2021!

QGraphicsView and QGraphicsScene go Home area...

  • QGraphicsView and QGraphicsScene did not set the setScene and created QSize (800, 800) QGraphicsRectItem in QPoint (0,0) of Scene.

    I want to show the CenterPoint of the Scene's RectItem in the middle of the screen when I press the home key of the keyboard when the view shows an area, scrolls, or scale zoom (in, out).

    QGraphicsView's resetMatrix or translate shows a strange area. Is there a workaround?

  • Qt Champions 2017

    translate is the right choice to change the drawing reference point. Also show the sample workable code to check on what is the strange behaviour & what you are expecting.

  • @dheerendra

    this translate exmple..


Log in to reply