rubenvb
21st January 2010, 20:50
Hi,
I would like to draw an arrow inside a QGraphicsScene linked to a QGraphicsview, but the arrow needs to reach from the left-bottom of the view to the right-bottom of the view. It also needs to move and stay +/- 10 pixels above the bottom. It should always be in view, but resize only one line (no transformation).
Something like this:
|-------------------->|
resized:
|---------------------------------------->|
note the arrow pointer thing (>) has not changed size.
It almost seems like I need to make a QPainterPath with three lineTo's and one moveTo, where one lineTo is subject to normal transformation, but the rest isn't.
My conclusion would be QPainterPath isn't what I'm looking for; maybe a QList<QGrapicsLineItem> is what I need. What do you think?
Thanks
I would like to draw an arrow inside a QGraphicsScene linked to a QGraphicsview, but the arrow needs to reach from the left-bottom of the view to the right-bottom of the view. It also needs to move and stay +/- 10 pixels above the bottom. It should always be in view, but resize only one line (no transformation).
Something like this:
|-------------------->|
resized:
|---------------------------------------->|
note the arrow pointer thing (>) has not changed size.
It almost seems like I need to make a QPainterPath with three lineTo's and one moveTo, where one lineTo is subject to normal transformation, but the rest isn't.
My conclusion would be QPainterPath isn't what I'm looking for; maybe a QList<QGrapicsLineItem> is what I need. What do you think?
Thanks