I would like to make an open file dialog to appear in a field in the attribute table of a vector layer. I guess I need to set widget type to 'Attachment' for that field and to check 'Display button to open file dialog'.
I also guess I should use the QgsEditorWidgetSetup
class, but I am not sure how to set the configuration options. I wrote something like:
setup=QgsEditorWidgetSetup('Attachment',{???}) #What should I write in {}?
layer.setEditorWidgetSetup(2,setup)
I have found examples for Date/Time and Value Map types, but what about Attachment?