Queensland Consolidated ActsThis division applies if—
(a) at the trial of a person charged with an indictable offence, the person pleads guilty and it is alleged or appears the person is mentally ill, or was, or may have been, mentally ill when the alleged offence was committed; or
(b) on the appearance for sentence of a person who has pleaded guilty to a charge of an indictable offence before a court and has been committed by the court for sentence, it is alleged or appears the person is mentally ill, or was, or may have been, mentally ill when the alleged offence was committed.