Rule 9.2.5 of the Australian Solicitors Conduct Rules 2012 (Qld) ('ASCR') states that you may disclose confidential client information if you do so for the purpose of preventing imminent serious physical harm to the client or to another person.
Rule 9.2.4 may also be relevant in that you may disclose the information for the sole purpose of avoiding the probable commission of a 'serious criminal offence' (as defined in the Glossary of Terms at the end of the rules).
These exceptions are permissive but don’t require you to take any action.
You should be reasonably sure that the threat is credible. This will be a matter of judgment. This exception would appear to permit you to disclose the threat and other confidential details to the client's doctor, the police and/or the person threatened, but the details disclosed should be limited to the information required to deal with the threat.
If the person threatened is ‘the other side’ and they have a solicitor, this disclosure should be to that solicitor, so as to avoid a breach of the ‘no-contact rule’ in Rule 33 ASCR although Rule 33.1.2 has an urgency exception. If you make disclosure to the other side’s solicitor, the decision about whether to inform the police or other relevant people might then be left to that solicitor and their client, unless urgency otherwise requires.