E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
Ps and Qs.
Mind your Ps and Qs. Be very circumspect in your behaviour.
Several explanations have been suggested, but none seems to be wholly satisfactory. The following comes nearest to the point of the caution:In the reign of Louis XIV., when wigs of unwieldy size were worn, and bows were made with very great formality, two things were specially required, a step with the feet, and a low bend of the body. In the latter the wig would be very apt to get deranged, and even to fall off. The caution, therefore, of
the French dancing-master to his pupils was, Mind your Ps [i.e. pieds, feet] and Qs [i.e. queues, wigs].