Another option would be to create getters and access the class variable:
@QmlElement
class Getter(QObject):
@Slot(result=str)
def getFolder(self):
return Main.folderPath
Sorry for these questions. I come from data science and GUI, QML and OOP is quite new to me