天天看點

Qt 擷取程式目前目錄

qt開發,需要擷取讀取目前目錄中的一個檔案,是以首先要擷取程式目前的目錄,網上找到一個方法,實測有效:

https://stackoverflow.com/questions/7402576/get-current-working-directory-in-a-qt-application

用qdir::currentpath()

效果:

Qt 擷取程式目前目錄

繼續閱讀