Implement expr in Q for custom selectors.