ComboBoxListDelegate

class omni.kit.widget.searchable_combobox.combo_model.ComboBoxListDelegate(flat=False)

Bases: AbstractItemDelegate

A delegate for custom widget representation in a TreeView.

Parameters

flat – bool Determines the flatness of the delegate’s appearance.

Methods

__init__([flat])

Initializes the ComboBoxListDelegate with an optional flat layout.

build_branch(model, item, column_id, level, ...)

Creates a branch widget that can be expanded or collapsed to show or hide children items.

build_widget(model, item, column_id, level, ...)

Builds the widget representing an item in the ComboBoxList.

clean()

Cleans up any resources or references used by the delegate.

__init__(flat=False)

Initializes the ComboBoxListDelegate with an optional flat layout.

Parameters

flat (bool) – If True, the delegate uses a flat layout. Defaults to False.

build_branch(model, item, column_id, level, expanded)

Creates a branch widget that can be expanded or collapsed to show or hide children items.

Parameters
  • model (ComboBoxListModel) – The model that provides data and structure.

  • item (ComboBoxListItem) – The item for which to create the branch.

  • column_id (int) – The column identifier where the branch is to be created.

  • level (int) – The level of indentation for the branch.

  • expanded (bool) – Indicates whether the branch is expanded.

build_widget(model, item, column_id, level, expanded)

Builds the widget representing an item in the ComboBoxList.

Parameters
  • model (ComboBoxListModel) – The model that provides data and structure.

  • item (ComboBoxListItem) – The item for which the widget is built.

  • column_id (int) – The column identifier where the widget is placed.

  • level (int) – The level of indentation for the item.

  • expanded (bool) – Indicates whether the item’s branch is expanded.

clean()

Cleans up any resources or references used by the delegate.