PDA

View Full Version : I want to change color of a part of QGraphicsLineItem



validator
17th September 2008, 10:46
Hi,

I added 100 pixel length of QgrahicsLineItem in QGraphicsScene. I want to change color 30 length of QGraphicsItem. How can I do that

QGraphicsLineItem
-----------------------------------------
-----------------------------------------

<-------><---------------------------->
30 pixel 70 pixel
yellow blue

<--------------------------------------->
100 pixel

caduel
17th September 2008, 11:01
Basically: create 2 QGraphicsLineItems, I guess.
If you need this often, wrap it in a custom QGraphicsItem subclass.