That behavior sounds like he could be sick. If there are 2 fish there wouldn't be an issue at this point for being lonely.
A QT tank is usually good to hold a fish 10-21 days, and true most people do not hold them that long. But illness can take 2 weeks to show up. In addition, treating a fish in a QT tank or catching him if he's ill, is much easier in QT.
Personally I try and keep them in QT a minimum of 2 weeks if they are all looking healthy. Indefinitely if they are not looking good.
*****Check the temperature, the water parameters. Un-cycled QT needs pwc
's every other day (maybe even every day), or 3rd day at least.
Of course having a fresh supply of perfect water can make the fish's life better.
One important thing about keeping QT water in tip top quality, is it allows the fish to settle down, not have to use it's energy for dealing with toxic water, and fight off the other stuff which it might have had to deal with as a result of transportation, various different conditions like pH , off temperatures, toxic ammonia in the transport bag.
In the pet store, bright lighting all day long and lack of safety, and places to hide. Fish being scooped out every 20 minutes and being chased by the net... Hard life for a little fish.
Give him time. The general cure / medication in general is hard on their systems too.
I hope he gets better soon. One additional option is using Epsom salts (which is not really salt but magnesium) to help him. It will not hurt him.
Info thread here if you are interested in ES.