Public beheading, or simply beheading is not ordained in the Qur'an at all.
The Book prescribes death penalty in cases of intentional, planned murder and for committing bloody crimes (FASAAD).
(Barring murder and fasaad or rebellion) any Qur'anic punishments become unquestionably applicable only where the Qur'anic Values have been established. The punishment must be dispensed compassionately since Allah is Ghafoor and Raheem. And no person should be humiliated since Allah has conferred dignity on children of Adam.
17:70 Surely, We have conferred dignity on children of Adam (as a birth right, regardless of where the child is born), ----.
When referring to "Shari'ah" (better, the Qur'anic) Law, people usually think of punishments alone and forget the Qur'anic Social Order and reforms. For example, the society must close all doors to lewdness before a court can dispense lashes for adultery/fornication.
A lifelong student