database - Qt-C++ connect Sqlite by absolute path -


i have qt project absolute path.

qstring path_to_db = "f:/binh_efeis/resources/database/efeis.sqlite"; 

when build project , run (as f:/binh_efeis/debug/efb.exe), works fine.

but can't use absolute paths when deploying other systems.

we wish use relative path.

using qcoreapplication::applicationdirpath() better using current directory. have used 3rd party libraries change current dir, cause problems if other parts of program rely on value of current dir.


Comments