There are 2 parts that contain the bulk of the code in this patch.
Style::event() is used to apply the QFocusFrame to a widget when it gets focus with a keyboard input related focus reason. If the focused widget has a focusProxy, this makes sure the QFocusFrame is applied to the focusProxy instead.
Style::drawFocusFrame() is mostly what you'd expect. It draws a focus frame based on the type of widget the QFocusFrame was applied to. I had to do a workaround for QFocusFrame not fully repainting outside the bounds of QSliders and QDials when the handle moves though. What I do is check if
_focusFrame is defined and then