Is there any such opensource code to read? For example I am not sure how to override functions that accept objects as parameters. There's only an example with "paint-event" parameter but that parameter gets conveniently ignored.