Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. mousePressEvent not fired at the edge of the QGraphicsView
Qt 6.11 is out! See what's new in the release blog

mousePressEvent not fired at the edge of the QGraphicsView

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 452 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohamed Hatem
    wrote on last edited by
    #1

    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.
    0_1535576487938_qgraphis.png

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Asperamanca
      wrote on last edited by
      #2

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

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved