That's IMO a bad example. ```frame``` is declared as ```YWidget*``` because it did not need to call more derived methods. If it now does, you should prefer a variable of appropriate type rather than downcasting in ```frame = ...`` and then upcasting again.