Results 1 to 20 of 23

Thread: QGraphicsView mouse events

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsView mouse events

    in order to debug this I sub classed QGrapicsScene.
    The mouse event (in this case click event) gets delivered to the scene.
    In the mouse event handler in the scene however, if I ask mouseGrabberItem() - I get -> 0, which means no item is grabbing the mouse - which means no item is getting mouse events.
    Any idea idea what could be causing this?
    I can't recall nor do I see this in the docs that I need to explicitly enable mouse grabbing on items since its a default behaviour (beyond setting the selectable flag).
    (I am using Qt4.3 in this case, and grabMouse() is not yet available. But this should not be needed any how...)

    EDIT:
    all the items return true on acceptedMouseButtons ().testFlag( Qt::LeftButton)


    help?
    Last edited by high_flyer; 16th July 2008 at 16:29.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 9
    Last Post: 22nd June 2008, 22:26
  2. Replies: 2
    Last Post: 2nd April 2008, 14:19
  3. Weird behaviour of mouse events and QMenu pop-ups
    By Ishark in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 07:46
  4. mouse moving don't produce mouse events
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2006, 06:13
  5. QStackerWidget and mouse events
    By high_flyer in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2006, 19:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.