Description
I'm trying to make a QWindowsStyle subclass and working with drawControl is giving a lot of issues because it doesn't properly hand over a useful StyleOption. For example if I'm trying to work with CE_MenuBarItem then I'd expect QStyleOptionMenuItem as the option argument or at least a way to turn the QStyleOption I'm given into a QStyleOptionMenuItem.
All the C++ examples show using qstyleoption_cast but there's no equal inside PySide.
The only work around I've found for this is to grab the data off the widget that's handed in, but that's pretty hacky itself. Any help with this is much appreciated because it seems to be the same with the other draw methods for QStyle.