[solved] Read a textfile
"Here":http://qt-project.org/doc/qt-4.8/declarative-xml-xmlhttprequest-xmlhttprequest-example-qml.html is explained how to load a local file.
I have my file saved in c:\data\file.txt.
How can I access it ?
I already tried c:\data\file.txt and file://c:/data/file.txt
Nothing worked :(
It works with
@text_input1.text = "c:/data/file.txt";@
Just so you understand why it works: a backslash is an escape character in strings. To use a literal backslash, you double them. Hover, in Qt you can also use forward slashes (used as path separators on linux) everywhere.
Thanks for the explanation :)