Correct options for lossless h265?

Right now I am using qp=0, as this appears to be identical to preset=lossless but with slightly better file sizes. I am not entirely clear on what preset=lossless means in Shotcut though. Is this the --lossless flag for h265? If so, how do you specify --lossless and something like the h265 preset=slow at the same time? Preset=slow doesn’t seem to affect file size as well for whatever reason. I appreciate any help that anyone can give me in understanding these things.

see https://trac.ffmpeg.org/wiki/Encode/H.265#Losslessencoding

This translates into Shotcut as adding the following in the Export > Other box:
x265-params=lossless=1

View the log of the export job and it says

x265 [info]: Rate Control : Lossless

Thanks for the clarification. I have tried that though, and it does not seem to affect the exported video, and the log does not mention the x265 info.

It does not work with hardware encoder.