It seems that QScreenRayCaster cannot be used in Python via PySide 2.
def __init__(self):
    # some code
    self.screen_ray_caster = Qt3DRender.QScreenRayCaster(self.root_entity)
    # some code
def some_mouse_event(self, e):
    self.screen_ray_caster.trigger(e.pos())
    self.screen_ray_caster.hits()
And error is thrown:
AttributeError: 'PySide2.Qt3DRender.Qt3DRender.QScreenRayCaster' object has no attribute 'hits'
I also tried to get information via signals and so I wrote this line:
self.screen_ray_caster.hitsChanged.connect(self.test)
Sadly this method has never been called.
Is there another way to to get information gained by ray caster?
