I would like to add and modify and expression for Opacity in a QGraphicsLineItem when I have the item QGraphicsLineItem, it not have a variable to modify the opacity expression Code to get the item: QgsProject.instance().layoutManager().layouts()[0].items()[0]