PDA

View Full Version : Setting the QGraphicsLineItem tickness.....



dreamer
9th July 2008, 12:48
I try to change the line item tickness but the only option i found was to change the pen's item width.

when i change the pen width, i see the line length that changes in my scene, but it mantains the same QGraphicsLineItem::length();

How can i change its tickness without change the pen's width????

aamer4yu
9th July 2008, 13:11
How can i change its tickness without change the pen's width????

:o Can you ??

Well if u mean to keep the original pens width , u can save the painter state and restore after u draw the line with new thickness / pen width.

like in paint of graphicsitem -


painter->save();
painter->setPen(penWithNewThickness);
// draw line
painter->restore();


Hope this is what u want. Or plz explain little more.