10-03-2013 06:27 AM
i am able to pass any variable to JS layer.
But have to pass a file either an image or a text file to JS layer.
How to pass it ?
10-03-2013 06:35 AM
By JS layer you mean QML? I assume you've seen this page:
The question is not very detailed to give an exact advice, but depending on what you're going to do with that file on JS layer, you can pass a filename, a QByteArray holding the data, or a pointer to a class instance such as Image. If the file resides on disk and will be loaded on QML side, then filename seems to be the most straightforward way.