For Qt code