Provide a slot that calls invalidate and optionally clearLayoutData

Often, this is the only thing needed, so avoid the scattered duplications.