Results 1 to 11 of 11

Thread: QGraphicsItem selection trouble

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QGraphicsItem selection trouble

    I would wish to send a bit but I'm not allowed:/.

    Anyway, I'm trying my best to explain it once.

    I have many LineItems which are created and form an ellipse inside another item group called SearchAreaItem. Futhermore, each LineItem has a shape() function for more efficiency(I assume you've seen the reason already). Now, what I really want to do is treat this SearchAreaItem as the composite item. Don't want to deal with LineItem's created inside it when the mouse hover over click operations take place. That's why I designed the SeachAreaItem as an item group.

    Now I want to ask, what the main usage of setHandlesChildEvents method?

    and, although I didn't implement the itemChange() method, I'm now able to drag-drop my SearchAreaItem( the ellipse) by only setting movable flag. Isn't it a bit odd?

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsItem selection trouble

    Now I want to ask, what the main usage of setHandlesChildEvents method?
    itemGroup->setHandlesChildEvents (false ); will make all the members in the group independent ...

    without setting this .. the focus will be on whole .. mouse click is common everywhere to the group members ..
    "Behind every great fortune lies a crime" - Balzac

  3. The following user says thank you to wagmare for this useful post:

    zgulser (13th August 2009)

  4. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QGraphicsItem selection trouble

    ... what about the shape() function?

Similar Threads

  1. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 10:31
  2. Replies: 1
    Last Post: 18th November 2009, 23:21
  3. QGraphicsItem selection
    By navi1084 in forum Qt Programming
    Replies: 2
    Last Post: 27th July 2009, 14:57
  4. selection of QGraphicsItem
    By navi1084 in forum Qt Programming
    Replies: 6
    Last Post: 23rd July 2009, 06:33
  5. Replies: 1
    Last Post: 25th February 2009, 00:34

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.