找回密码
 立即注册
收起左侧

qt中什么方法可以代替GetCurrentDirectory,谢谢

2
回复
8917
查看
[复制链接]
累计签到:36 天
连续签到:1 天
来源: 2015-8-8 09:44:04 显示全部楼层 |阅读模式
3Qter豆

最佳答案

查看完整内容

QString QDir::currentPath () [static] Returns the absolute path of the application's current directory.
回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2015-8-8 09:44:05 显示全部楼层
QString QDir::currentPath () [static]
Returns the absolute path of the application's current directory.
回复

使用道具 举报

累计签到:36 天
连续签到:1 天
2015-8-8 10:43:30 显示全部楼层
sywh 发表于 2015-8-8 09:58
QString QDir::currentPath () [static]
Returns the absolute path of the application's current directo ...

还是不太会啊,比如
BOOL Search_Module(QString Path)
{
#if defined( _WIN32 )
        char        TempPath[MAX_PATH];
        struct        _finddata_t c_file;
        long        hFile;

        // Search a module file in the current directory.
        GetCurrentDirectory(MAX_PATH - 11, ConvertCharToLPWSTP(TempPath));
       
        strcat(TempPath, "\\build\\Debug\\Type0019.md3");
        if ((hFile = _findfirst(TempPath, &c_file)) == -1L) {
                return FALSE;
        }
        strcpy((char*)Path, TempPath);
#elif defined(__APPLE__)

怎么把里面的GetCurrentDirectory替换掉,谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了