Keep in mind that lots of K-30, K-50, K-500, & some K-S1, K-S2, & very few K-70 cameras have experienced the dreaded aperture motor failure. You can read more about it
HERE. Just click on the threads that have "aperture" in the title to get an idea.
Now, it's not guaranteed that it will fail, but too many already have. I personally wouldn't recommend a K-30 nor a K-50, unless you don't mind fixing them if they fail. I have 2 K-50 bodies that I had to fix on my own. I'd rather go for the earlier DSLR models that you're looking at or spring for a K-5 or a slightly better K-5II or K-5IIs without the AA filter.
The Pentax Q cameras are quite nice. I'd rather go for a Q7 or a Q-S1, but they get pricier. They do have a much smaller 1/1.7 sensor than the DSLR cameras, but it's still a bitl larger than the 1/2.3 sensor on the older Q cameras.