Skip to content

Use magicgui to generate GUI in SliceWidget #48

Closed as not planned
Closed as not planned
@dstansby

Description

@dstansby

When I implemented SliceWidget, I manually built the GUI and widgets using qtpy. It would make much nicer code if this was done with magicgui however. For an existing example of how to do this see:

self._key_selection_widget = magicgui(
self._set_axis_keys,
x_axis_key={"choices": self._get_valid_axis_keys},
y_axis_key={"choices": self._get_valid_axis_keys},
call_button="plot",
)
self.layout().addWidget(self._key_selection_widget.native)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions