• 4176阅读
  • 4回复

[提问]拖拽的是快捷方式,如何获得真实的文件地址? [复制链接]

上一主题 下一主题
离线downstairs
 

只看楼主 倒序阅读 楼主  发表于: 2011-02-27
如题所示。。求大牛小牛们。给点提示。。。我不想再自问自答啦。。。。。谢谢
喜爱编程的猫头鹰
离线downstairs

只看该作者 1楼 发表于: 2011-02-27
快站不住了。。。求大哥大姐帮帮吧 !!哭了
喜爱编程的猫头鹰
离线downstairs

只看该作者 2楼 发表于: 2011-02-27
查阅API

  1. QString QFile::symLinkTarget () const
  2. This is an overloaded function.
  3. Returns the absolute path of the file or directory a symlink (or shortcut on Windows) points to, or a an empty string if the object isn't a symbolic link.
  4. This name may not represent an existing file; it is only a string. QFile::exists() returns true if the symlink points to an existing file.
  5. This function was introduced in Qt 4.2.
  6. See also fileName() and setFileName().


但是很遗憾。。没效果??
输出的STRING  
是快捷方式的返回: 一个拐角向下的符号
不是快捷方式的: 一个拐角向上的符号

论坛里显示不出来。。只能描述了

就这样??? 大哥大姐。。。我一个人在战斗么??跪求。。


[ 此帖被downstairs在2011-02-27 18:50重新编辑 ]
喜爱编程的猫头鹰
离线downstairs

只看该作者 3楼 发表于: 2011-02-27
跪累了。起来看看。还是没人?????????
喜爱编程的猫头鹰
离线downstairs

只看该作者 4楼 发表于: 2011-02-27
QFileInfo    symLinkTarget的确是个可以获得真实路径的函数。。但是。。由于路径的问题.qdebug输出的是一个符号。。。NND!!!坑死我啦。。。就用symlINKtARGET就OK
喜爱编程的猫头鹰
快速回复
限100 字节
 
上一个 下一个