I don't think using focus events is required. It should be enough to reimplement the paint event and there check if the widget has focus to decide what to draw.