PDA

View Full Version : QGraphicsView: Moving multiple selection



marcel
23rd April 2007, 19:47
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.

marcel
23rd April 2007, 19:59
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!! :)