Hi, guys! I'm trying to develop a graphics software just like Photoshop with multi-layer so I choose Graphcis View Framework. But I have a problem about drawing rubber-band using Graphics View Framework.
I have some tools like draw a line, draw a rectangle and so on, implemented by view items. I don't know how to implement rubber-band with these items. It seems I should override paint function, take QGraphicsLineItem's subclass for example, there are two fields, startPoint and endPoint, and QPainter.drawLine(startPoint, endPoint) in paint function, but when should I invoke this function? And what's the option parameter when I call it? I assign these two points in mouse event functions of a subclass of QGraphicsScene, am I right?
Thank you all for giving me suggestions!