Implement masking support (Qt only)