You could add this to WBaseWidget. My feeling on RTTI is that it should be a last-resort.