sunil.nair last edited by
Hi, I have a QImage as a QGraphicsItem inside a QGraphicsView. I want to apply a 2 px border to this image(graphics item.). Is there a way to apply a stylesheet to this QGraphicsItem?
raven-worx Moderators last edited by raven-worx
@sunil.nair said in QGraphicsItem Border:
Is there a way to apply a stylesheet to this QGraphicsItem?
no. QSS is only available to QtWidgets
You have to draw the border yourself (maybe place the pixmap item inside a custom QGraphicsRectItem - which draws the border).
m.sue last edited by
you should be able to do so by overriding the
QRectF boundingRect() constfunction. Just call the base function to get the current rect., and