Unsolved Call function from frame in other QML file
-
How can i call a function from another file ?
My Pyotherside Handler is executed for sure, but my function "antwortGetDialogs" isn't executed...I removed everything that isn't important for my question.
Hope someone can help methis is my Main.qml :
import QtQuick 2.2
import io.thp.pyotherside 1.2
import QtQuick.Controls 1.1ApplicationWindow {
id: mainWindowStackView { id: view initialItem: frameDialogs anchors.fill: parent Component { id: frameDialogs Dialogs {id: dialogsWindow} } } Python { id: python Component.onCompleted: { addImportPath(Qt.resolvedUrl('./')); importModule('Main', function () {}); setHandler("antwortGetDialogs", frameDialogs.Dialogs.antwortGetDialogs); } }
}
my Dialogs.qml :
import QtQuick 2.2
import io.thp.pyotherside 1.2
import QtQuick.Controls 1.1Rectangle {
id: windowfunction antwortGetDialogs(item) { console.warn("func antwortGetDialogs") }
}