I created a project in Qt Design Studio and then moved it to Qt Creator. I went through the conversion steps and now I only have .ui.qml files Now I want call some functions in .ui.qml files. For example, I have a shape that I want to log a text by clicking on it. But qt creator alert me that I can not use functions or JavaScript blocks in Qt Quick UI forms.
errors in qt creator:
in Main.ui.qml :
import QtQuick 2.8
Item {
id: main
width: 1024
height: 768
Image {
id: someImage
MouseArea {
anchors.fill: parent
onClicked: {
// Here "JavaScript blocks are not supported in a Qt Quick UI
// form." error occurs
}
}
}
}
