1. QMessageBox中文乱码

  这里的中文乱码是指只有QMessageBox才出现中文乱码,其他都可以正常使用的情况。有些博客中提到使用QString::fromUtf8()函数, 实测有些情况是不可行的,这时可以使QString::fromLocal8Bit()函数

2. Qt中打开文件夹,注意不是文件

#include <QDir>
#include <QProcess

QDir dir(fileDirect); //fileDirect是文件夹路径
QProcess::startDetached("explorer " + fileDirect);.

 

相关文章:

  • 2021-08-25
  • 2021-06-28
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-29
  • 2021-12-04
  • 2021-10-01
  • 2021-10-07
  • 2021-05-27
  • 2022-01-07
  • 2021-08-24
相关资源
相似解决方案