How to getting the application dir in QML file
I wan't to do relative path evaluation.
Check "resolvedUrl":http://qt-project.org/doc/qt-5/qml-qtqml-qt.html#resolvedUrl-method if its useful.
To get current directory try,
I hope this works, but the fact is that didn't satisfy my requirement
Sorry but can you make more clear how you want the path ?
sorry for unclear statement, I checked the result ofQt.resolvedUrl("."), Its give s me qrc:/// and that's not I wanted, I want the absolute path of the application's executable file's containing directory. such as
then I am looking for
@lygstate, have you included the QML file in the qrc ?
Yes, you are right, i included it in qrc file,
And pass the result to your qml file
I also using the C++ and I believe the performance is better
You can use the baseUrl() reported by the engine.