Important: Please read the Qt Code of Conduct -

mousePressEvent not fired at the edge of the QGraphicsView

  • I am making the QGraphiscView resizeable by mouse.

    so when the mouse moves near the edge within certain small range The QMouseEvent is triggered and the cursor shape becomes as the cursor in the Image below.

    and then when the user presses with mouse and moves it, the widget starts resizing.

    all of this is working properly.

    I have a bug that when I am at the very very edge of the widget and I press the mouse and try moving it, it doesn't resize, although it's working properly in most cases.
    with debugging I found that the mouse move event is triggered while the mouse press event is not triggered and the buttons() is empty although I pressed the mouse. I don't really understand why is this happening and it's taking hours.

  • Have you tried using grabMouse() when you start to drag?

Log in to reply