title: Multiple Threads, one at a time read/write
body: <p>There are two <code>QFile-pointer</code> pointing to the same file, they belong different threads. One writes data to the file, the other reads. But I want to have only one operation going on, read or write.</p>
  
  <pre><code>if(!this-&gt;file-&gt;exists()) {
     qDebug()&lt;&lt;"The file is not exists";
  }
  if(this-&gt;file-&gt;isOpen()) {
     qDebug()&lt;&lt;"The file is open";
  }
  </code></pre>
  
  <p>Let me put it another way: how to check whether the file in opened?</p>
  
  <p>I test <code>file.isOpen()</code>? It doesn't work. How can I do that?</p>