Results 1 to 3 of 3

Thread: Drag and Drop in QGraphicsScene misses items

  1. #1
    Join Date
    Aug 2009
    Posts
    24
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Drag and Drop in QGraphicsScene misses items

    I have a number of ellipse items in a scene being viewed. Pressing a mousebutton on an item invokes MyScene::mousePressEvent() which always correctly identifies the item under the cursor using itemAt() but when I then invoke the base class QGraphicsScene::mousePressEvent() it will or will not invoke item::mousePressEvent().

    When it does, everything works fine but I get an apparently random sequence of successes and failures when trying to move a number of ellipses (control points for curves) around.

    Any ideas. I'm lost
    Enno

  2. #2
    Join Date
    Aug 2009
    Posts
    24
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Drag and Drop in QGraphicsScene misses items

    Problem: The curves (QGraphicPathItems) started interfering with the controlpoints.

    Solution: Give the controlpoints a higher Zvalue to make itemAt() or whatever selects the item prefer the controlpoints over other items.

  3. #3
    Join Date
    Aug 2009
    Posts
    24
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Drag and Drop in QGraphicsScene misses items

    Post #2 describes only part of the problem. Still looking.

Similar Threads

  1. Change cursor & status during Drag & Drop
    By ronlongo in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2008, 17:56
  2. Catch drag and drop items
    By nina1983 in forum Qt Programming
    Replies: 1
    Last Post: 23rd July 2008, 18:24
  3. Drag and Drop in a QTreeWidget subclass
    By kishore in forum Qt Programming
    Replies: 2
    Last Post: 14th May 2008, 08:12
  4. Drag & drop items on the same QTreeView
    By wind in forum Qt Programming
    Replies: 2
    Last Post: 11th October 2006, 15:29
  5. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 20:43

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.