Answer the question
In order to leave comments, you need to log in
How to replace OnClick in qml?
I must say right away that I am not a programmer at all, so do not judge strictly for the question.
As I understand it Qt.
There is code in .qml file
states: [
State {
name: "skip"
when: player.Sw < 0
PropertyChanges {
target: skip_layout
visible: true
}
]
MouseArea {
id: skip_layout
anchors.fill: parent
hoverEnabled: true
visible: false
onClicked: player.skipSmt();
}
Answer the question
In order to leave comments, you need to log in
Instead of the entire MouseArea component, immediately writeComponent.onCompleted: player.skipSmt();
Immediately
qt-project.org/doc/qt-4.8/qml-component.html#onCom...
By property change
qt-project.org/doc/qt-4.8/qml-propertychanges.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question