Results 1 to 2 of 2

Thread: incorrect QGraphicsItemGroup mouse drag behavior

  1. #1
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default incorrect QGraphicsItemGroup mouse drag behavior

    hi,
    I guess this is incorrect behavior of ItemGroup. Let me explain it.
    Consider a group with arbitrary number of items. Now whenever any item within group is selected and dragged using mouse, the group remains stationary through out!
    I tried to investigate this issue (at least for me this is an issue) and found out that the MouseGrabber item was the child item of group which was mousePressed but the mouse events were being handled by the group (as it calls setHandlesChildEvents(true) )

    To work it around now i am using groupChildItem->setAcceptedMouseButtons(0) for each child of group.

    I just wanted to know your opinions on this. Is this bug ?
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: incorrect QGraphicsItemGroup mouse drag behavior

    Why do you think the group shouldn't be stationary? An item group is an entity that groups independent objects, as far as I understand it. If you want the whole group to move, simply select the group when any of its items is selected.

Similar Threads

  1. Strange behavior with Drag and Drop (not always drops)
    By Mona Shokrof in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2007, 18:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.