Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to implement multiple actions on onClicked [SOLVED]
-
I want to implement multiple actions at once. For instance, we have the following snippet:
MouseArea { onClicked: textField.text = "test" }
I want the following functionality:
MouseArea { onClicked { textField.text = "test" myImage.source = "http//....." } }
Is it possible?
-
Yes but you need to write with a colon**:**
onClicked: { textField.text = "test" myImage.source = "http//....." } }
-
Aah, thanks! I was missing this functionality.
-
Hi,
I can't try now but I think is possible.
You can execute any kind of Javascript code in a slot
-
@mcosta Actually, my problem is solved. Thanks to @t3685 for the solution. I've just forgot to mark it as SOLVED. Anyway, thanks ;)