StupidBeauty
Read times:433Posted at:Thu May 3 03:05:29 2012
- no title specified

QFile相关的东西

构造函数QFile:: QFile ( const QString & name )需要传递给它的是一个可找到的文件名,如果以相对路径传递一个找不到的文件名,则构造出的QFile对象是无效的。今天在这点上犯错咯。

对无效的QFile对象调用 bool QFile:: rename ( const QString & newName )函数的话,即使名为的newName文件并不存在,返回值仍然会是false,表示重命名失败。

另外,参考这里:http://www.qtcn.org/bbs/read-htm-tid-27178.html QString QFileInfo:: path () const返回的是文件所在的目录的路径,其中不包含文件名。而 QString QFileInfo:: filePath () const返回的是文件的完整路径,其中是包含文件名的。

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4