def METHOD_NAME(dgt, painter, option, qtindex):
    painter.save()
    butkw = dgt.get_index_butkw(qtindex)
    # FIXME: I don't want to create a widget each time just
    # so I can access the button's style
    button = guitool_components.newButton(**butkw)
    pressed = dgt.is_qtindex_pressed(qtindex)
    view = dgt.parent()
    paint_button(painter, option, button=button, pressed=pressed, view=view, **butkw)
    painter.restore()