Add as_dict to get the config as a dict; fix PyQt4 issues.