Hello,

is there a way to check if the file is used by another process like soffice?
Under Windows it works perfect but under mac/linux is doesnt work. I think mac/linux doesn't make the file only readable.

My Testcase:

Qt Code:
  1. QString fileName = childElement.text();
  2. fileName = QDir::tempPath() + "/" + fileName;
  3.  
  4. for(int i=0; i < 100; i++)
  5. {
  6. QFile file(fileName);
  7.  
  8. if(file.open(QIODevice::WriteOnly))
  9. {
  10. qDebug() << "JA";
  11. } else {
  12. qDebug() << "NEIN";
  13. }
To copy to clipboard, switch view to plain text mode