Hi,

I need to create a legend item to show various curves on screen. I am thinking to use one single QGraphicsTextItem as it supports line break (\n), so I can create several line breaks to show different curves by their names, but I also need to draw a small segment of the curve in front of their names using the same pen to distinguish which curve is which.

How can I draw a line segment in front of a text insider QGraphicsTextItem? Of course I also need a tab space for the line segment...

Thanks...