title: Can not get directory size in QT C++
body: <p>cur_file.size return 0, how I can solve this problem?</p>
  
  <pre><code>void MainWindow::setDirectory() {
  QString directory_way = QFileDialog::getExistingDirectory(0, "Choose directory: ", "");
  QFile cur_file(directory_way);
  QFile fileOut("fileout.txt");
  if(fileOut.open(QIODevice::WriteOnly | QIODevice::Text))
  {
          QTextStream writeStream(&amp;fileOut);
          writeStream &lt;&lt; "You chose directory: " &lt;&lt; directory_way &lt;&lt;" with size " &lt;&lt; cur_file.size();
          fileOut.close();
  }}
  </code></pre>