Creates a Qt Editor for arbitrary Python Objects using Reflection.
pip install editorium==0.0.0.14
Editorium creates Qt editors for objects or functions via reflection.
Object fields or method parameters are reflected and an editor generated for each field or parameter. For instance an int field is generated as a QSpinBox editor.
Please see the StringCoercion project for the command-line equivalent.
Type | AbstractEditor | QWidget |
---|---|---|
int | IntEditor | QSpinBox |
float | FloatEditor | QLineEdit |
str | StringEditor | QLineEdit |
Optional[T] [1] | NullableEditor | QCheckBox & Editor(T) |
bool | BoolEditor | QCheckBox |
Enum | AbstractEnumEditor [3] | QComboBox |
Flags | FlagsEditor | QCheckBox[] |
List[T] | ListTEditor | Editor(T)`[]` |
Filename [2] | AbstractBrowserEditor | QLineEdit & QToolButton |
[1] | Optional[T] is a PEP-484 annotation supplied by Python's typing library and indicates that a value may be None. |
[2] | Filename is a PEP-484-style annotation provided by the MHelper library and provides hints on an acceptable filename e.g. Filename[".txt", EMode.SAVE]. |
[3] | The StringCoercion library is queried to obtain the list of options for types such as Enum, so if you have registered your list providers with StringCoercion you will not need to do so again for Editorium. |