[PySide] How do I hide a QGraphicsItem's "focus outline"?

Ch'Gans chgans at gna.org
Thu Aug 11 01:54:25 CEST 2016


On 11 August 2016 at 10:38, Kevin Cole <dc.loco at gmail.com> wrote:
> When my QGraphicsItem receives a mousePressEvent, it draws a
> dotted-line rectangle around the item. Is there a way to suppress
> that? (I want the item selected / focused, but I don't want to see the
> dotted line.
>
> I'm actually working with a QGraphicSvgItem, but I don't think that
> will make a difference.

If i understand your problem correctly,you're talking about the
QGraphicSvgItem's paint function that draws outline when the item is
selected or not.
If that's the case, you'll have to implement your own SVG item (or
override it), which might not be as complicated as it first looks.
But since you're using python, that might not be the way you would be kin to go.

My 2 cents,
Chris


> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside



More information about the PySide mailing list