Hi,
Can a C++ file and Qml File Share the same javascript file , if it is possible how Can we do that.
Thanks,
Regards.
Hi,
Can a C++ file and Qml File Share the same javascript file , if it is possible how Can we do that.
Thanks,
Regards.
Would you care to elaborate? What do you mean "share a javascript file"? How does C++ use javascript files?
chetu1984 (11th February 2011)
Thanks "Master of Zen" At last someone wanted to answer my question
I will elaborated as much as i can,
I am Learning Qt and QML using the Declarative example and out of that i used the Calculator example where the Qml file makes use of Java script File for calculating the values, so in the process of learning i am trying to get the same calculated value form the Java script file to on of the Forms i have in the QT application, so what i tried to do is opening the Qml calculator file on button click on the Qt form and trying to get the calculated value back on to a text box in the Qt form but not on to the display on to the calculator.qml . what i thought is if there is a way that i can make use of same java script file for getting the value to the text box in Qt form. presently i am studying through the documents for integrating Qml and C++. i am still not able to figure out what to do .so if anyone could guide me in the right direction, it would be a great help.
If you design your (javascript) code right, you can use QScriptEngine to run a javascript function. This is more or less what QML does behind the scenes anyway.
Okay, Can you please give me an example of right design.... or what it can possible look like.... just the algorithmic part....
Bookmarks