PDA

View Full Version : How to remove some border of QGraphicsRectItem



nearrainbow
28th August 2018, 13:41
Hi!
I have a rectangle drawn by QGraphicsRectItem and i want to remove some of its border (ex right and left border).

Ginsengelf
6th September 2018, 15:20
Hi, you could do it the other way round:
1) subclass QGraphicsRectItem and reimplement the paint() method
2) set a QPen with width = 0 to remove borders
3) paint the borders you want yourself.

Ginsengelf