customdelegate — Camelot documentation

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- controls »
- delegates »

# customdelegate

class `camelot.view.controls.delegates.customdelegate.` `CustomDelegate`(parent=None, editable=True, **kwargs)

  Base class for implementing custom delegates.

  `editor`

  class attribute specifies the editor class that should be used

  `createEditor`(parent, option, index)

    Parameters: | option – use an option with version 5 to indicate the widget

    will be put onto a form

  `paint_text`(painter, option, index, text, margin_left=0, margin_right=0, horizontal_align=1, vertical_align=128)

    Paint unicode text into the given rect defined by option, and fill the rect with the background color :arg margin_left: additional margin to the left, to be used for icons or others :arg margin_right: additional margin to the right, to be used for icons or others

  `render_html`(index)

    Generator that renders a value to html

  `render_ooxml`(value)

    Generator for label text in Office Open XML representing this form

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- controls »
- delegates »

Comments
blog comments powered by Disqus