Sorry for your loss.
First pic looks like there's a white stringy poop; was that actually there, or is that just a result of the camera? If so, there's a chance that the fish had some kind of intestinal parasite. If the fish hadn't been eating in the store due to that, the basic stress of a tank move could have pushed it over the edge. So even though you may have done everything right in the transfer to the QT, the problem pre-existed anything you did.
Asking a shop to show you a fish eating before purchase is always a good idea. A good LFS won't hesitate to do so, either. If they give you any push-back on that, then they are not a vendor you should be buying from anyways. When I first got into the hobby, I was worried that the LFS would be offended or something - but that's not been the case at the good shops.