QML_IMPORT_NAME = "g1.backend.main"
QML_IMPORT_MAJOR_VERSION = 1
@QmlElement
@QmlSingleton
class MySingleton(QObject):
@Slot(result=str)
def getFolder(self):
return "c:\\"
and in QML I'm trying this:
Text {
id: lblFolderLocation
text: MySingleton.getFolder()
}
And the error is this now:
file:///C:/Users/Francisco/Documents/G1_QML/qml/pages/newAnalysis.qml:88:17: Unable to assign [undefined] to QString