I am creating some lines, and I would like to add a 500m buffer around thoses lines. But i need this buffer to automaticaly change if i modify my line around. Is there any solution to this?
You can create a
virtual layer that is linked to your source layer. It has the advantage of creating a new in-memory layer that can easily be turned on/off.
Go to menu
layer / add layer / add - edit virtual layer and use the formula
select st_buffer(geometry,500) from myline;
The buffer distance is in the projection unit, so in meters or degrees.
One easy solution is to use the geometry generator, the drawback with this solution is that the buffer exists only on the display (not a layer you can reuse) and only in the document where it's configured. Also if you have many lines it may slow down rendering.
If you choose to go this way just go to the symbology tab of the line layer, click the plus to add a symbol layer and choose the Geometry generator type with Polygon/Multipolygon geometry then just type
buffer( $geometry,500) as function (this only work if you are working in a CRS in meter, if not you will need to add some reprojection to the function). You could then symbolize the buffer to your liking.
As the buffer is dynamically created on the line geometry it will reflect any change to the line.