I want to build a simple application where i can Switch the forms (or pages) via Signal Slot. I use for the Frame of my app a Stackview. I can't connect the Signal in my ui.qml (or the .qml File) to my Slot in main.qml main.qml:
import QtQuick.Controls 2.5
import QtQuick.VirtualKeyboard 2.4
ApplicationWindow {
id: window
visible: true
width: 640
height: 480
title: qsTr("Stack")
StackView{
id: stackView
initialItem:"InitializeForm.ui.qt"
anchors.fill: parent
}
}
Initialize.qml:
InitializeForm {
signal moveNextView(String nextView)
}
InitializeForm.ui.qml
Item {
id: formId
width: 400
height: 400
property alias initializeText: initializeText
Text {
id: initializeText
x: 77
y: 158
width: 246
height: 85
text: qsTr("Initialize")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 22
}
}
Can anybody help me?