Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-220

All options passed to drawPrimitive are QStyleOption and aren't useful sometimes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P4: Low P4: Low
    • 6.0
    • 1.2.0
    • PySide
    • None
    • Windows 7

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            chocolossus Malcolm Thomas Gustave
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes