How can we scale the pen's width
I draw a line with the default pen in QGraphicsScene with the function
QGraphicsScene::addLine ( const QLineF & line, const QPen & pen = QPen() );
but when I scale this with the function: QGraphicsView::scale().
The line's length can be scale very well, but the width of the line always keeps the same.
Are there some solutions to do it?
Thanks!
Re: How can we scale the pen's width
Quote:
Originally Posted by
learning_qt
I draw a line with the default pen in QGraphicsScene with the function
QGraphicsScene::addLine ( const QLineF & line, const QPen & pen = QPen() );
but when I scale this with the function: QGraphicsView::scale().
The line's length can be scale very well, but the width of the line always keeps the same.
Are there some solutions to do it?
Have you seen http://doc.trolltech.com/4.4/qpen.html#setWidth ?
Especially: Has your pen a width of 0 (i.e. is it a "cosmetic" pen) or 1?