'Set/update the widget state from the model at index.'

def setWidgetData(self, widget, index):

    params = index.data(ParametersRole)
    if (not isinstance(params, dict)):
        params = {}
    widget.setParameters(params)
