1. QDir::currentPath() 的使用
我的理解:
若在vs2010平台下,该函数返回的是 工作目录(属性-调试-工作目录(可自定义))。
Qt5.8 原文:
Returns the absolute path of the application's current directory. The current directory is the last directory set with QDir::setCurrent() or, if that was never called, the directory at which this application was started at by the parent process.
Qt5.8 原文翻译:
返回程序当前目录的绝对路径。当前目录是最后一次用QDir::setCurrent()函数设置的目录,或者若没有调用函数QDir::setCurrent(),那么,程序父类进程启动的目录为当前目录。
- 2. QApplication::applicationDirPath() 的使用