Example for how to create custom painter widgets