Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Moving QGraphicsView when moving the mouse



  • Im new to Qt and was wondering how i would achieve this. What im talking about is the basic behaviour of most cameras in most games, that is to say once the mouse is near enough at the border of the screen it moves.
    The main problem i am having with this is most likely that i do not know how to set the scene rectangle as the focussed item as the scene only uses a QRect and not a QGraphicsItem (that can be made focusable). Obviously it wouldnt make much sense anyway as the scene is not an item, but there has to be a solution for this right?


Log in to reply