Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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?
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