Holding the PS button for 10 seconds will turn the controller off, regardless of what it is paired to (PC or PS4), according to this post.
If you want to turn it off from DS4, though, I believe there is a button in the UI to disconnect/turn off the controller.
You can also check the DS4Windows setting "Disconnect from BT when Stopping", which will immediately disconnect the controller from the OS and turn it off when you press stop. When you want to start DS4Windows again, just press the PS button and it will power up and connect to the paired system.