Answer the question
In order to leave comments, you need to log in
How to set the correct OnClicked for a button?
I set the button in the QML file, everything is fine
Button {
signal qmlSignal()
onClicked: {
qmlSignal()
}
}
Answer the question
In order to leave comments, you need to log in
Alternatively, in the UI we write:
// MainForm.ui.qml
property alias btnName: btnName
MainForm {
id: mainForm
btnName.onClicked: {
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question