Skip to content

pyguiadapter.widgets.objecteditor

控件配置类

SchemaObjectEditorConfig dataclass

Bases: CommonParameterWidgetConfig

Source code in pyguiadapter\widgets\extend\objecteditor.py
@dataclasses.dataclass(frozen=True)
class SchemaObjectEditorConfig(CommonParameterWidgetConfig):
    default_value: Optional[Dict[str, Any]] = None
    schema: Dict[str, ValueType] = None
    ignore_unknown_keys: bool = False
    fill_missing_keys: bool = False
    display_text: str = "Edit"
    window_title: str = "Object Editor"
    window_size: Tuple[int, int] = (500, 600)
    center_container_title: str = ""
    key_column_header: str = "Key"
    value_column_header: str = "Value"
    item_text_alignment: Union[Qt.AlignmentFlag, int, None] = Qt.AlignCenter
    value_item_alignment: Union[Qt.AlignmentFlag, int, None] = None
    key_item_selectable: bool = False
    row_selection_mode: bool = True
    real_key_as_tooltip: bool = False
    stretch_last_section: bool = True
    alternating_row_colors: bool = False
    show_vertical_header: bool = False

    @classmethod
    def target_widget_class(cls) -> Type["SchemaObjectEditor"]:
        return SchemaObjectEditor

控件类

SchemaObjectEditor