PDA

View Full Version : problem with QGraphicsTextItem's black dotted line.



jonike
13th August 2011, 10:57
Hello, everyone, how to hide the black dotted line in QGraphicsTextItem. When I edit it, it will always appear, this will affect the appearance.so,i want to delete it.

Here what i mean:
http://www.qtcn.org/bbs/attachment/photo/Mon_1108/10_1f0d1313074097dea34343f26e638.jpg


Thanks.

d_stranz
14th August 2011, 18:27
Probably have to derive a new class from QGraphicsTextItem and reimplement the paint() method so it doesn't draw the rect when the item is selected.

Of course, this will confuse your users completely, because you will change the standard behavior, and now they won't be able to tell if they are editing the text or not.