Registering a Python list property to QML in pyside2
I'm trying to load a spreadsheet and pass a list of the worksheets back to my QML interface. But I'm unable to find a way to provide a list(and later a dictionary) back to the QML script. Here's my QML: FileDialog { id: openDialog title: "Open spreadsheet" nameFilters: [ "Excel files (*.xls *.xlsx)", "All files (*)" ] selectedNameFilter: "Excel files (*.xls *.xlsx)" onAccepted: { file.load(fileUrl) console.log(file.name) console.log(file.sheetnames) } onRejected: { console.log("Rejected") } } Here's the my python class: class File(QtCore.QObject): def __init__(self, *args, **kwargs): super