This can be resolved by adjusting certain settings on your computer and updating the drivers.
However, many complaints across the globe state that the DS4 Controller is not connecting to the PC. If you are using a DualShock controller for your Playstation 4 and want to connect the same to your PC, you can do it with an open-source, free application known as DS4Windows.