Not sure what this has to do with Qt.

If it is single static image then the problem is best solved by use your image editor to determine the centre and radius of the circular headlight areas and coding that into your program.

If this has to work with arbitrary images then you are after edge detection, segmentation or similar algorithms. You might find something you can use in OpenCv. It is not trivial: not all headlights are round, not all cars have visible headlights, not all images contain cars etc.