PDA

View Full Version : how to apply marching effect to the rubberband rect of the QGraphicsView?



syclopse
27th April 2011, 08:40
Hello,
can anybody tell me how can I apply marching ant effect to the rubberband rectangle of the QGraphicsView 6298?

MarekR22
27th April 2011, 10:07
when setting pen for drawing rectangle first use QPen::setDashOffset to achieve required effect.

syclopse
27th April 2011, 10:26
first understand my question I want marching ant effect on the rubberband's rectangle that is inbuilt facility of QGraphicsView?

and actually I dont know how to get the object of the rectangle of the rubberband of the QGraphicsView.

high_flyer
27th April 2011, 11:25
Just set the drag mode:
QGraphicsView::setDragMode()
I don't remember if it will give you a marching ant effect though.
You could achieve it by using a QTimer in combination with Mareks suggestion.