1 获取路径问题 //加载可执行文件的路径 QDir file_path = QCoreApplication::applicationDirPath(); file_path.cdUp(); file_path.cd("database"); qDebug() << "file_path:" << file_path; QString file_db = file_path.absolutePath() + "/"; 2 vs2015 设置可执行文件输出路径