[SOLVED] Label supports mouse click event?
QML and Qt Quick
3
Posts
3
Posters
921
Views
1
Watching
-
@
Label {
text: "Hello world"
MouseArea {
anchors.fill: parent
onClick: {
console.log("click tada");
}
}
}
@ -
In addition what dasRicardo said, it is not like QLabel. Label is item. MouseArea is typically defined for visible item. So MouseArea can be defined for Label and implement whatever the mouseArea event you would like to have.