code.ivysaur.me
autoconfig
Autoconfig allows you to edit any Go struct with a Qt interface based on MIQT.
struct Foo { []----------------------[]
Name string | Name: [___________] |
} | [Save] |
[]----------------------[]
Supported types
- string, bool,
*struct - Any custom types (many types included in package)
Customization
Struct tags:
ylabel- Override label. If not present, the default label is the struct field's name with underscores replaced by spaces.yfilter- For "ExistingFile"; filter to apply in popup dialogyenum- For "EnumList"; list of dropdown options, separated by double-semicolon (;;)
Interfaces:
InitDefaulter- May be used if autoconfig needs to construct a new version of your typeAutoconfiger- Add a fully custom Qt widgetfmt.Stringer- May be used to format some types for display
Notes
- Passed in struct should be a pointer value
- Call the saver, but, warning that some fields may be mutated automatically without calling
- Public fields only