The minimum amount of layover time required for entry into Doha is theoretically 8 hours, that's why the QR STPC hotel limit is set as such. Anything less than 8 hours & there's a chance immigration will refuse entry, assuming you admit it of course...
I have a 7 hour transit in a few weeks, this is very interesting thank you!