Qt UI: small code optimisation for improving performance.