I'm having trouble connecting my PS4 to my pc monitor?

I've been searching all over the internet but can't seem to find anything! I'm trying to connect my PS4 to my pc monitor (which is joined onto the pc, not through wires). But when I connect the HDMI cord and select HDMI in; in the settings it goes black grey continuously. I've got the resolution settings on 1080p for both PS4 and PC. Does anyone have a solution/ other free way of using ps4 on monitor?

Added (1). I've been searching all over the internet but can't seem to find anything! I'm trying to connect my PS4 to my pc monitor (which is joined onto the pc, not through cords). But when I connect the HDMI cord and select HDMI in; in the settings it goes black, then grey continuously. I've got the resolution settings on 1080p for both PS4 and PC. Does anyone have a solution/ other free way of using ps4 on monitor?

Added (2). The pc model is a lenovo ideacentre a310 with an HDMI input jack and output jack

What is the model number of your PC? I assume it is an all-in-one?

Are you sure that your All-in-One has an HDMI Input? Most of them have outputs so you can have a second monitor, not inputs. We'd need to know the exact model to know for sure. The info should be on the case somewhere, usually by the serial number.