How to check whether file already open or not in Qt ?
-
From Qt application I want to check whether file is already in open state or not , Is there any way in Qt to check .
example :- open any xls or pdf file "xyz.xls/pdf"
-open Qt application and there check whether xyz.xls is in open state then handle it differently and if it not in open state handle it differently.
Please let me know.
- open any xls or pdf file "xyz.xls/pdf"
-
No, there is no built-in way to do it in Qt. The operating system usually allows any number of processes to open files.
-
Hi,
On *nix OSes you can parse the output of lsof if present using QProcess
-
Thanks for providing information.