[Qt-interest] QGraphicsLineItem Dual Colour Problem

Sean Harmer sean.harmer at maps-technology.com
Fri Aug 21 15:14:11 CEST 2009


On Friday 21 Aug 2009 13:40:30 Ankit Agarwal wrote:
> Hi,
> I have a QGraphicsLineItem. I need the line to be in two color, i.e. one
> half shall be in one color and the second half shall be in another, may be
> red and black.
>
> How do I archive this?
Just derive your own class from QGraphicsItem and implement bondingRect() and 
paint(). Should be trivial.

Sean



More information about the Qt-interest-old mailing list