Results 1 to 2 of 2

Thread: QGraphicsView: Moving multiple selection

  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGraphicsView: Moving multiple selection

    Hello,

    Is there any possibility to move multiple selected items at once? The items are selected with setSelectionArea.

    It seems that only the item under the mouse ( at the time of dragging ) is moved.
    I was thinking to group the items together, because I am guaranteed this way they will move all in the same time, but I don't want to get there .

    Other solution I can think of is to use setPos on the other items.

    Anyone else?

    I also attached a screenshot. (The mouse cursor didn't get caught by PrintScreen ).

    Regards.
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsView: Moving multiple selection

    Ok . Looks like this is a useless post .
    Sorry.
    I fixed it by removing a forgotten QGraphicsScene::clearSelection() in a mousePressEvent(). Multiple selection dragging works just fine.

    Shame on me!!

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

    stevel (26th April 2008)

Similar Threads

  1. QGraphicsView rubberband selection
    By Vladimir in forum Qt Programming
    Replies: 2
    Last Post: 29th January 2007, 21:21
  2. Moving multiple QGraphicItems
    By StefanHirche in forum Newbie
    Replies: 2
    Last Post: 11th January 2007, 21:27
  3. QTableWidget Sorting Multiple Selection
    By rhiacasta in forum Qt Programming
    Replies: 1
    Last Post: 30th August 2006, 21:05
  4. Multiple selection in QTextEdit
    By munna in forum Qt Programming
    Replies: 4
    Last Post: 1st July 2006, 07:58
  5. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23

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.